Knowledgebase
Categories
Categories
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 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?
Also Read
There are two main ways to back up or restore a MySQL database on our servers: via SSH or the...
phpMyAdmin is a third-party tool included with cPanel, used for maniuplating MySQL databases...
This feature is not supported by cpanel but you can ask support to add File_priv to your db user...
MySQL is an open source relational database management system. MySQL is noted mainly for its...
cPanel can guide you through the process of setting up a MySQL database, along with the...


