mysqldump备份数据库 Couldn't execute 'SHOW VARIABLES LIKE 'gtid\_mode''
错误
mysqldump: Couldn’t execute ‘SHOW VARIABLES LIKE ‘gtid_mode’’: Table ‘performance_schema.session_variables’ doesn’t exist (1146)
原因
这是mysql升级的结果;因为我本地切换过MySQL版本而导致的错误
解决
- win
1
2
3
4
5
6更新
mysql_upgrade -u root -p --force
需要停止进程
net stop mysql
再次开启
net start mysql - linux
1
2mysql_upgrade -u root -p --force
systemctl restart mysqld
相关资料:
Comments