Database ERROR:Can't connect to local MySQL server through socket '/var/lib/mysql/mys

liang3391

Active Member
Apr 14, 2009
36
0
56
cpanel/whm


Database ERROR:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I tried several ways to repair, can be a while, the results of the point of death. All good ideas to the point.
 

JPC-Martin

Active Member
PartnerNOC
May 31, 2008
37
1
58
cpanel/whm


Database ERROR:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I tried several ways to repair, can be a while, the results of the point of death. All good ideas to the point.
Please make sure that symbolic link for mysql.sock is not missing in /tmp partition.

Try this
---
stop mysql

run

# cd /tmp
# n -s /var/lib/mysql/mysql.sock mysql.sock

and start mysql service
---
 

PlatinumServerM

Well-Known Member
PartnerNOC
Jul 10, 2005
400
3
168
New Jersey, USA
cPanel Access Level
Root Administrator
This can be a number of things. Check the disk space to make sure it is not full, check the tmp directory contents and permissions, etc. You can also check the logs for any other possible clues.