Can't connect to local MySQL server through socket

Sujoy Dhar

Well-Known Member
Jul 24, 2016
64
9
8
India
cPanel Access Level
Root Administrator
Twitter
Now i am in this trouble any one here to solve this :

mysqlcheck --all-databases -r #repair
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory") when trying to connect
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello,

Could you let us know the output to /var/lib/mysql/$hostname.err when restarting MySQL on this system?

Thank you.