Answer the question
In order to leave comments, you need to log in
MySQL can't connect - why?
Good afternoon.
After restarting the MySQL server, it does not want to start, it gives a message:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
# ps ax| grep mysql
31936 pts/0 S+ 0:00 grep mysql
chkconfig --list | grep mysql
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
service mysqld start Start
mysqld: [ OK ]
Answer the question
In order to leave comments, you need to log in
Try to delete or recreate '/var/lib/mysql/mysql.sock', make a backup first.
cat /etc/my.cnf | grep sock
make sure the socket is created where php (or whatever) is looking for it.
turn off the muscle, and see what's up with the socket.
It often happens that during a hard reboot, the muscle does not have time to remove the socket, and then it does not start
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question