问题提示
Lost connection to MySQL server during query
官网上讲,这是一个关于升级的故事,从低版本升级到高版本后,整个数据库需要重新整理一下
After upgrading to a new version of MySQL, run mysql_upgrade (see Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”). This program checks your tables, and attempts to repair them if necessary. It also updates your grant tables to make sure that they have the current structure so that you can take advantage of 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 of the help tables. For upgrade instructions, see Section 5.1.10, “Server-Side Help”.
mysql_upgrade should not be used when the server is running with --gtid-mode=ON, since it may make changes in nontransactional system tables in the mysql database, many of which are MyISAM and cannot be changed to use a different storage engine. See GTID mode and mysql_upgrade.
所有,运行mysql_upgrade -u root -p
然后在grant即可解决上面这个问题
Lost connection to MySQL server during query
官网上讲,这是一个关于升级的故事,从低版本升级到高版本后,整个数据库需要重新整理一下
After upgrading to a new version of MySQL, run mysql_upgrade (see Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”). This program checks your tables, and attempts to repair them if necessary. It also updates your grant tables to make sure that they have the current structure so that you can take advantage of 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 of the help tables. For upgrade instructions, see Section 5.1.10, “Server-Side Help”.
mysql_upgrade should not be used when the server is running with --gtid-mode=ON, since it may make changes in nontransactional system tables in the mysql database, many of which are MyISAM and cannot be changed to use a different storage engine. See GTID mode and mysql_upgrade.
所有,运行mysql_upgrade -u root -p
然后在grant即可解决上面这个问题
解决MySQL升级后连接丢失问题:使用mysql_upgrade
本文提供了解决MySQL升级后出现连接失败问题的方法,通过运行mysql_upgrade命令来检查并修复数据库表,确保顺利过渡到新版本。

被折叠的 条评论
为什么被折叠?



