V
V
Vladimir Shishmintsev2014-03-12 11:57:43
MySQL
Vladimir Shishmintsev, 2014-03-12 11:57:43

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'

I look whether it is running or not, and also whether it was in autoload
# 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

If run manually it runs fine.
service mysqld start Start
mysqld: [ OK ]

I can't figure out what's wrong

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
v_prom, 2014-03-12
@Pingvi

Try to delete or recreate '/var/lib/mysql/mysql.sock', make a backup first.

V
Vadim Yakovlev, 2014-03-12
@FrimInc

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 question

Ask a Question

731 491 924 answers to any question