Client Login

Why do I get error message: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' on shell?

If you get this error message when trying to use the mysql command line utility from shell:

'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock''

It means you need to access the mysql using -h 127.0.0.1 e.g.

mysql -h 127.0.0.1 -u yourdbuser -p yourdatabase

If you get this error message from a web script, please check with support for the status of the mysql server.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
What is MySQL? (Views: 3238)