Friday, March 1, 2013

Can't connect to local MySQL server through socket '/var/tmp/mysql.sock' (2)

When there is a database error "Editing Can't connect to local MySQL server through socket '/var/tmp/mysql.sock' (2)" for a domain, the first thing to do is to look whether a symlink of /var/tmp/mysql.sock is present in /tmp/. If not create one.

ln -s /var/tmp/mysql.sock /tmp/mysql.sock
This can be fixed within 2 minutes.

No comments:

Post a Comment