MySQL報錯:ERROR 2013 (HY000): Lost connection to MySQL server during query

來源:互聯網
上載者:User

標籤: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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.