2013-05-29 180 views
0

在我的CentOS雲服務器上執行yum更新後,MySQL無法啓動。MySQL服務器無法在百勝升級後啓動

在網頁搜索的錯誤後:

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

我tryed尋找通過查找和grep文件的mysql.sock但沒有succeded。的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 

希望你們能幫助我,我可以提供你需要的任何信息,只是告訴我,我怎麼能幫助你幫助我。

編輯: 試圖爲MySQL和chmod的文件chwon,要麼。

在否定標記我之前,看看我寫了什麼,我已經使用MYSQL_UPGRADE,錯誤與套接字相同。

[[email protected]]# 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

您在日誌中有一個錯誤,它解釋發生了什麼問題。 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.表示您的mysql表格模式已過期,需要升級。

+0

下面是代碼當我運行mysql_upgrade: [根@ cpro5022的mysql]#mysql_upgrade 尋找 'mysql的' 如:MySQL的 尋找 'mysqlcheck的' 爲:mysqlcheck的 運行「使用默認連接參數的 mysqlcheck的mysqlcheck的:出現錯誤:2002:嘗試連接時無法通過套接字'/var/lib/mysql/mysql.sock'連接到本地MySQL服務器(2) 致命錯誤:升級失敗 –