Fixing MySQL and phpMyAdmin

There seems to be a problem with how current versions of OS X store the mysql socket and how phpMyAdmin looks for it. It seems currently the socket is stored at /tmp/mysql.sock but phpMyAdmin is looking for it at /var/mysql/mysql.sock. The result is a connection error type #2002.

After a lot of Googling here’s the solution. Create a symlink. Do the following from the terminal.

sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Now phpMyAdmin will connect to your local MySQL installation.

Related posts:

  1. Fixing cyrus Yeah, I did something stupid and had to reinstall my...
  2. Backup, backup, backup I’m usually not too bad with this, but… Who thinks...

Related posts brought to you by Yet Another Related Posts Plugin.

This entry was posted in code, computer, mac-osx, osx-server. Bookmark the permalink.

Comments are closed.