Summary: | apache can't connect with mysql throug /var/run/mysqld/mysqld.sock | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Federico Moro <zayer> |
Component: | [OLD] Server | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | VERIFIED INVALID | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Federico Moro
2005-11-29 16:27:29 UTC
No real info here, first of all I'm missing why should apache itself try to connect to mysql. Describe your problem better and reopen then. This bug is caused by incorrect access permissions on /var/run/mysqld/ After running mysqld for the first time permission, ownership and group of this path are: drwxrwx--- 2 mysql root 4096 Nov 29 21:23 /var/run/mysqld/ It can be solved changing group to mysql drwxr-x--- 2 mysql mysql 4096 Nov 29 21:23 mysqld/ and adding apache user at mysql group in /etc/group mysql:x:60:apache (apache must be restarted after this). I've explained bug and how to solve it. Apache needs to connect with mysqld socket if a webpage uses a MySQL database. Sorry, I forgot specify mysql version, it's mysql-4.1.14 Your permissions are incorrent. # ls -la /var/run/mysqld/ total 5 drwxr-xr-x 2 mysql mysql 136 Nov 25 14:19 . drwxr-xr-x 7 root root 640 Nov 29 18:58 .. -rw-r--r-- 1 mysql mysql 0 Nov 25 14:06 .keep -rw-rw---- 1 mysql mysql 6 Nov 25 14:19 mysqld.pid srwxrwxrwx 1 mysql mysql 0 Nov 25 14:19 mysqld.sock INVALID bug. I know they are incorrect, but it's mine, mysql did it when I started it _the first time_ (In reply to comment #6) > I know they are incorrect, but it's mine, mysql did it when I started it _the > first time_ No, it did not. See the ebuild: <snip> dodir "/var/run/mysqld" keepdir "/var/run/mysqld" chown -R mysql:mysql \ "${D}/var/run/mysqld" </snip> Closing. |