Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Repair PHP/MySQL connections in 10.4.4' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Repair PHP/MySQL connections in 10.4.4
Authored by: brainerwm on Jan 27, '06 07:41:25AM
I chose to follow the Apple hint and use /var/mysql/mysql.sock on MacOSXclient10.4 since it is supposed to be more secure. I made a file called /etc/my.cnf which contained:


[mysqld]
socket=/var/mysql/mysql.sock

...and I updated permissions as described:


>sudo chmod 775 /var/mysql

That worked fine.

The next problem, which I haven't seen mentioned here, was that the mysql and mysqladmin commands didn't work in terminal as they were still looking for /tmp/mysql.sock. Adding the client group to /etc/my.cnf solved it:



>echo "[client]" >> /etc/my.cnf
>echo "socket=/var/mysql/mysql.sock" >> /etc/my.cnf

My fully working /etc/my.cnf file now looks like:


[mysqld]
socket=/var/mysql/mysql.sock
[client]
socket=/var/mysql/mysql.sock

Here is mysql.com's useful page about /etc/my.cnf.

[ Reply to This | # ]