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

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 解决问题。
解决流程如下:
阿里云MySql数据库突然出现运行查询语句失败提示:Native table 'performance_schema'.'session_variables' has the wrong struct阿里云MySql数据库突然出现运行查询语句失败提示:Native table 'performance_schema'.'session_variables' has the wrong struct