標籤:error 2013 (hy000) mysql error
首先貼上實驗用各版本:
OS:CentOS 6.5
MySQL:
mysql> select version ();
+------------+
| version () |
+------------+
| 5.6.22 |
+------------+
1 row in set (0.00 sec)
事情是這樣的:本來是要在虛機上搭建一個wordpress做實驗,剛建立完資料庫,就在賦權額時候發生不在計劃的錯誤:
mysql>grant all on wordpress.* to[email protected] identified by "wp123456";
ERROR2013 (HY000): Lost connection to MySQL server during query
查看報錯日誌如下:tail -fn 30 /var/log/mysqld.log
2016-11-15 12:56:22112085 [ERROR] Missing system table mysql.proxies_priv; please runmysql_upgrade to create it
2016-11-15 12:56:22112085 [ERROR] Native table ‘performance_schema‘.‘cond_instances‘ has the wrongstructure
2016-11-15 12:56:22112085 [ERROR] Native table ‘performance_schema‘.‘events_waits_current‘ has thewrong structure
2016-11-15 12:56:22112085 [ERROR] Native table ‘performance_schema‘.‘events_waits_history‘ has thewrong structure
2016-11-15 12:56:22112085 [ERROR] Native table ‘performance_schema‘.‘events_waits_history_long‘has the wrong structure
看報錯日誌一直在提示wrongstructure(結構錯誤),通常結構錯誤是由升級MySQL版本導致的,我雖然沒有升級,但是在安裝MySQL5.6.22前,安裝的是5.1版本,可能是由於卸載的不乾淨(但是之前在賦權時並沒有此問題,疑惑??),看了網上N多方法,但是對於我的問題就是不感冒啊!突然在網上看到一個升級指令碼修複的例子,就想著我的是不是也適用(因為我之前裝過舊版本),所以就試了一下果然OK啊!看到成功那一刻,一掃額頭陰霾O(∩_∩)O~
執行升級指令碼命令:
/usr/local/mysql/bin/mysql_upgrade -u root -p
輸入密碼後斷行符號,再次賦權成功啦,哇哢哢..........
650) this.width=650;" src="http://s5.51cto.com/wyfs02/M00/8A/33/wKioL1gqxgKhfSrTAADe8f3cVx0562.png-wh_500x0-wm_3-wmp_4-s_1712459546.png" title="1.png" alt="wKioL1gqxgKhfSrTAADe8f3cVx0562.png-wh_50" />
mysql> grant all on wordpress.* to [email protected] identified by "wp123456";
Query OK, 0 rows affected (0.00 sec)
本文出自 “龍捲風” 部落格,請務必保留此出處http://ruilong.blog.51cto.com/4043170/1873096
MySQL報錯:ERROR 2013 (HY000): Lost connection to MySQL server during query