Knowledgebase
Search:     Advanced search
Browse by category:
Contact Us

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

Views: 77
Votes: 0
If you get this error message when trying to use 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.
Others in this Category
document How do I connect to and use MySQL?
document Can I connect remotely to MySQL database?
document How can I backup and restore my MySQL databases?
document How do I create/delete/edit my databases and users?
document Can I import csv files using Load Data Infile?
document What is MySQL?
document Which version of MySQL is available?



RSS