0

在我的 CentOS 云服务器上执行 yum update 后,MySQL 没有启动。

在网上搜索错误后:

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

我尝试通过 find 和 grep 搜索文件 mysql.sock 但没有成功。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
4

1 回答 1

0

您的日志中有一个错误,它解释了出了什么问题。[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.表示您的mysql表的架构已过时,需要升级。

于 2013-05-29T18:04:03.040 回答