Msg#: 4279206 posted 8:06 pm on Mar 10, 2011 (gmt 0)
Did you check if the file /var/lib/mysql/mysql.sock exists? List the directory with the following command:
ls -ladF /var/lib/mysql/mysql*
The result should be this:
drwx------ 2 mysql mysql 4096 Apr 4 2010 mysql/ srwxrwxrwx 1 mysql mysql 0 Jan 7 00:16 mysql.sock=
Sometimes the mysql.sock doesn't exist because it has been erased accidentaly, and sometimes it is not a socket but a normal file. In that case the = is missing at the end of the file name with this specific directory listing command. If it is a file, deleting that file and restarting the MySQL server should do the trick.
You should also check if there has been a recent update of MySQL on your server which changed your my.cnf file. That file should at least contain the following lines: