完美运行几天后,如果 mysql 服务器出现以下错误。
mysql -uroot -p -h localhost
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
答案1
然后请执行以下操作
sudo service mysql stop
sudo rm /var/lib/mysql/ib_logfile0
sudo rm /var/lib/mysql/ib_logfile1
sudo service mysql restart
sudo service mysql restart