服务器突然断电,造成MySQL数据库启动不了的问题,现象如下:
[root@localhost html]# service mysql51-mysqld start
kill 31011: No such process
Another MySQL daemon already running with the same unix socket.
Starting mysql51-mysqld: [FAILED]
[root@localhost html]# service mysql51-mysqld status
mysql51-mysqld dead but pid file exists
本想找pid文件删除,后来找不到这个文件,于是删除mysql.sock文件后启动也可以:
[root@localhost html]# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.back
[root@localhost html]# service mysql51-mysqld start
kill 31011: No such process
Starting mysql51-mysqld: [ OK ]