Can’t connect to local MySQL server through socket

I you are reading this, probably you are getting the next error:

/usr/local/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)’
Check that mysqld is running and that the socket: ‘/tmp/mysql.sock’ exists

To fix it, and if you are running cPanel just try to run the next commands:

# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

# /scripts/mysqlup –force

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

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