我正在运行 ubuntu 服务器。当我尝试登录 mysql(正在运行)时,出现以下错误
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Run Code Online (Sandbox Code Playgroud)
但是文件/var/run/mysqld夹中不存在 mysqld.sock 文件。在执行ps aux | grep mysql命令时,我意识到 mysql 服务器没有运行。
然后我尝试使用重新启动mysql服务器
service mysql start
service mysql restart
/etc/init.d/mysql start
Run Code Online (Sandbox Code Playgroud)
但是,启动过程在所有 3 种情况下都失败了。
/var/log/mysql/mysql.log和/var/log/mysql/mysql.err文件是空的。
但/var/log/error.log显示以下信息:
140425 12:49:05 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140425 12:49:05 [Note] Plugin …Run Code Online (Sandbox Code Playgroud)