How To solve – ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Sharing is caring!

Something like:

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Ok this was tough enough to find. :P
Three simple things.

the number inside parenthesis indicates the error number we want to think about firstly. The number two means that mysql daemon cannot find that file. So, to solve this, try to

and then try to run

.

If you get another error like

this means the mysql deamon crashes because it cannot write to the file.

2. Just write

and check if your filesystem (most cases) or the Hard drive you use for mysql is … full! Simply delete some files and run

again.

Don’t believe it? Just check it!

Thnx for reading,

Specktator

Comment:

This site uses Akismet to reduce spam. Learn how your comment data is processed.