MySQL5.5 failed to execute grant after upgrading 5.6: Error 2013 (HY000): Lost connection to

Source: Internet
Author: User
Tags socket

MySQL 5.5 upgraded to MySQL5.6, in the absence of any changes in the case, directly to the data placed under the MySQL 5.6 Run, the beginning of all normal, but after a new database, assigning permissions, the error:
ERROR 2013 (HY000): Lost connection to MySQL server during query

At first I thought it was not connected to the socket because I saw the error at the same time:

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

But after viewing, found sock normal, no problem, and then ran to the official website below to see the MySQL 5.6 Upgrade guide, which has such a paragraph:

After upgrading to a new version of MySQL, Run Mysql_upgrade (click Section 4.4.7, "Mysql_upgrade-check and upgrade MySQL Tables "). This is checks your tables, and attempts to repair them if necessary. It also updates your grant tables to "sure" they have the current structure so, can take advantage any New capabilities. (Some releases of MySQL introduce changes to the structure of the "Grant tables to add" new privileges or features.)

Mysql_upgrade does not upgrade the contents to the Help tables. For upgrade instructions, click 5.1.10, "Server-side help".

Mysql_upgrade should not being used the server is running with--gtid-mode=on, since it could make changes in nontransacti Onal system tables in the MySQL database, many of which are MyISAM and cannot is changed to use a different storage . Gtid mode and Mysql_upgrade.

That's clear, execute it:

Mysql_upgrade-u root-p

After execution, the GRANT statement is executed before the problem is resolved.

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.