Monday, March 26, 2012

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

If below condition is not the case then google the error and you will get lots of solutions.

Condition:
You did't do any configurational change in server since last time it was working fine. But after restart mysql daemon is not started and gives the following error.
Error:
"Can't connect to local MySQL server through socket ../mysql.sock'.."


if this is the case then cause is most likely server is out of disk space. Because Mysql daemon tries to create 'mysql.sock' file upon startup and there is no disk space left for this to happen.

Hope this will help you,
Recently I encountered with this problem and googled it. Found a lot of solution results but none of them cured the error.