Today, I have to waste a long time with new server. Last night my internet connection disconnected while cPanel was installing in the server. Later I have seen that everything running fine except mysql. It is showing some error like:
Warning, no valid mysql.sock file found.mysql has failed
searching many tutorials, forums after 2/3 hours later I found the following post. http://forums.spry.com/showpost.php?s=06fff7fc89bd04e88fbdf1ecf60f4be1&p=2055&postcount=6
Then I simply commented the line basedir=/var/lib from my.cnf. and restarted the server. it worked like charm.
thanks Andrew for your nice post.
The whole error message is:
connect to server at ‘localhost’ failed
error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’
Check that mysqld is running and that the socket: ‘/var/lib/mysql/mysql.sock’ exists!
mysql has failed, please contact the sysadmin (result was “Warning, no valid mysql.sock file found.mysql has failed”).