Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR 2002: Can't connect to local MySQL server through socket '/var/l

Status
Not open for further replies.

Halfcan

Technical User
Joined
Dec 8, 2002
Messages
214
Location
US
Hi all,

I've had mysql 4.0.12 server and client runnning for about six months now, but haven't used it lately. Now when I need it, it is giving this error message:
[root@tunes sbin]# mysql -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

mysql server and client are the same box.

I've checked that mysqld is running:
[root@tunes sbin]# ps -xa | grep mysql
7476 pts/0 S 0:00 grep mysql

I've checked that mysql.sock exists in /var/lib/mysql

I've restarted the server (mysql daemon).

I can't run mysqladmin or anything.
Any ideas?
Thanks,
HC
 
Is mysql.sock writable by your process?

Does lsof show that mysqld is listening on mysql.sock?
 
It seems that mysql.sock was corrupt. I replaced the file and all works ok. This issue is closed.
Thanks.
HC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top