February 16, 2006

The Mystery of the Missing Socket

Recently, I’ve discovered that in addition to the usual configuration required to install phpMyAdmin on Mac OS X, you now have to set the socket and connect_type variables in the phpMyAdmin config file to get it to talk to MySQL. Like so:

$cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';
$cfg['Servers'][$i]['connect_type'] = 'socket';

I’m not sure why this is. I was getting, “Error 2002: Can’t connect to local MySQL server through socket” but after setting these configuration variables, it’s running fine. It was tricky to work this out though so I’m posting it here in the hopes it will save someone else some time.

Note: I most likely have no idea how to solve your MySQL/phpMyAdmin problem. I recommend reading the respective products’ documentation.

Previous Post

Comments

Jay Allen

OMG, what weird serendipity. I just spent about an hour figuring this out last night and I sit 15 feet away from you. Brad pointed me over here.

Scary…

Heh. That’s a bummer that we both had to spend some time to work it out. Oh well. :)