Решено. Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock


Check that mysqld is running and that the socket: ‘/var/lib/mysql/mysql.sock’ exists!
[root@server log]# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
mv: overwrite `/var/lib/mysql/mysql.sock.bak’?
[root@server log]# service mysqld start
Another MySQL daemon already running with the same unix socket.
Starting mysqld: [FAILED]

[root@server mysql]# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

[root@server mysql]# /etc/init.d/mysqld start
Starting mysqld:                                           [  OK  ]
[root@server mysql]#

Leave a Reply

Your email address will not be published. Required fields are marked *