在我的CentOS云服务器上执行yum更新后,MySQL无法启动。
在网上搜索错误后:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
我试图通过find和grep搜索文件mysql.sock但没有成功。尝试以安全模式启动mysql后,mysql的错误日志是:
130529 13:51:18 InnoDB: Starting shutdown...
130529 13:51:23 InnoDB: Shutdown completed; log sequence number 0 43655
130529 13:51:23 [Note]
130529 13:51:23 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
130529 14:15:52 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130529 14:15:52 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 481 error messages,
but it should contain at least 641 error messages.
Check that the above file is the right version for this program!
130529 14:15:52 [Note] Plugin 'FEDERATED' is disabled.
/usr/libexec/mysqld: Unknown error 1146
130529 14:15:52 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
130529 14:15:52 InnoDB: Initializing buffer pool, size = 8.0M
130529 14:15:52 InnoDB: Completed initialization of buffer pool
130529 14:15:53 InnoDB: Started; log sequence number 0 43655
130529 14:15:53 [ERROR] Aborting
130529 14:15:53 InnoDB: Starting shutdown...
130529 14:15:58 InnoDB: Shutdown completed; log sequence number 0 43655
130529 14:15:58 [Note]
130529 14:15:58 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
希望你们能帮助我,我可以提供你需要的任何信息,告诉我如何帮助你帮助我。
编辑: 尝试用chwon文件为mysql和chmod。
在负面标记我之前,看看我写的是什么,我已经使用过MYSQL_UPGRADE而套接字的错误是一样的。
[root@cpro5022mysql]# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
答案 0 :(得分:0)
您的日志中有错误可以解释出现了什么问题。 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
表示您的mysql
表架构已过期,需要升级。