阿里云MySql数据库突然出现运行查询语句失败提示:Native table 'performance_schema'.'session_variables' has the wrong struct

版权声明:本文为博主Pillar原创文章,欢迎转载并使用博客阅读器阅读 http://fir.im/CSDNBlog https://blog.csdn.net/Pillar1066527881/article/details/89010999

1、问题描述:
阿里云数据库MySQL运行查询语句突然出现查询失败

2、错误日志:
[Err] 1682 - Native table ‘performance_schema’.‘session_variables’ has the wrong structure

3、问题原因:MySQL过时,需要升级

4、解决办法:
只要root用户执行以下语句即可:

    # mysql_upgrade -u root -p --force
    # systemctl restart mysqld 或 service mysql restart

5、使用PuTTY命令行,登录后,使用 sudo -i 命令获得root权限
最终我的情况靠运行:systemctl restart mysqld 解决问题。
解决流程如下:
在这里插入图片描述在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Pillar1066527881/article/details/89010999
今日推荐