Answer the question
In order to leave comments, you need to log in
How to decide? Can't connect to local MySQL server through socket...?
There is a VPS with CentOS installed.
Sometimes websites get error messages: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
What could be the problem?
Answer the question
In order to leave comments, you need to log in
Hello. If your my.cfg is configured like this:
socket=/var/lib/mysql/mysql.sock
Then check the operation of the service
mysqladmin -u root -p status
If everything is ok, then the rights may be lost. Try to fix it like this
sudo chmod -R 755 /var/lib/mysql
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question