意外删除/tmp/mysql.sock
一时间的操作失误,将/tmp/mysql.sock删除了。导致不能连接数据库:(
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
(111)
检查:
bash$./mysqladmin --socket=/tmp/mysql.sock version
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (11
1)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
bash# ./safe_mysqld
The file /usr/local/mysql/libexec/mysqld doesn't exist or is not executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/safe_mysqld.
bash$ ./mysqld
/data/mysql/bin/mysqld: Fatal error: Can't find messagefile '/usr/local/mysql/sh