前提:突然停电再来电后,服务器的mysql无法重新自启动,人工启动后发生如下问题:
- 查看数据库是否启动: /etc/init.d/mysqld status
- 启动数据库: service mysqld start
- 出现错误:Another MySQL daemon already running with the same unix socket.
Based on Centos, an additional method for getting it back up again when you run into this problem is to move mysql.sock:
- mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
- service mysqld start
Restarting the service creates a new entry called mqsql.sock