CentOS下的Mysql遇到的相关问题记录
程序员文章站
2022-07-12 20:38:43
...
问题提示
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即可解决上面这个问题
上一篇: Java 线程池源码分析
下一篇: mysql无法启动的分析