MySQL PHP Socket error with Tiger 10.4.4


Hi All,

I upgraded to Tiger 10.4.4 last night, and restarted my MySQL database server as always. It works fine from the command line.


When I try to connect to it from Apache/PHP, from my own PHP scripts and from phpMyAdmin, I get the following error:

phpMyAdmin says:
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

My scripts say:
Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)

Again, the MySQL server is up and running. The only change I've made to my system is the 10.4.4 upgrade.

EDIT: If it's any help, I found the mysql.sock file here: /tmp/mysql.sock
a) Could the Tiger upgrade have moved that file from /var/mysql/ to /tmp/ ?
b) Is it now just a question of editing a PHP or Apache config file?

EDIT2: OK. So I CAN connect using the following in PHP:
(in other words, specifically specifying my socket.)

EDIT3: Strangely, same technique (specifying socket) DOESN'T work with phpMyAdmin. In the config file I set the socket variable to "/tmp/mysql.sock" but to no avail.

EDIT4: (I hope watching me work through this helps someone else!)
Got phpMyAdmin to work by specifying the socket in the same field as the server:
$cfg['Servers'][$i]['host'] = 'localhost:/tmp/mysql.sock';
Which seems incorrect, since phpMyAdmin provides the following:
$cfg['Servers'][$i]['socket'] = '';

So I'm good to go for now, but still unclear what the root of the problem is.

Any ideas?

Many thanks in advance!