MySQL Error: Error (HY000): Lost connection to MySQL server during query

Source: Internet
Author: User
Tags mysql version

First, paste the experiment version:

Os:centos 6.5

Mysql:

Mysql> select version ();
+------------+
| Version () |
+------------+
| 5.6.22 |
+------------+
1 row in Set (0.00 sec)

The thing is this: Originally to build a virtual machine on a WordPress to do experiments, just created the database, in the right to take place when the error occurred in the plan:

mysql> Grant all on wordpress.* To[email protected] identified by "wp123456";

ERROR2013 (HY000): Lost connection to MySQL server during query

Check the error log as follows: TAIL-FN 30/var/log/mysqld.log

2016-11-15 12:56:22112085 [ERROR] Missing system table Mysql.proxies_priv; 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

Reading the wrong log has been prompted Wrongstructure (structural error), usually structural errors are caused by upgrading the MySQL version, although I did not upgrade, However, before installing MySQL5.6.22, the installation of the 5.1 version, may be due to the removal of the dirty (but before the right to do not have this problem, doubt?? ), see the online n many methods, but for my problem is not a cold ah! Suddenly on the internet to see an example of the upgrade script repair, I think I do not also apply (because I have previously installed the old version), so I tried it is ok Ah! See success that moment, sweep forehead haze O (∩_∩) o~

Execute the Upgrade script command:

/usr/local/mysql/bin/mysql_upgrade-u root-p

Enter the password after the return, again empowered to succeed, wow ka ka ....

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 [e- Mail protected] identified by "wp123456";
Query OK, 0 rows Affected (0.00 sec)

This article is from "Tornado" blog, please make sure to keep this source http://ruilong.blog.51cto.com/4043170/1873096

MySQL Error: Error (HY000): Lost connection to MySQL server during query

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.