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.

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: