MySQL兼容性show_compatibility_56

mysqldump备份报错

根据报错可以知道 因为在以后的版本中表已经不存在所以报错,解决需要将参数show_compatibility_56设置为on

[root@qa-mysql ~]# mysqldump  -uroot -p   -A > all.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Couldn't execute 'SELECT COUNT(*) FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'rocksdb\_skip\_fill\_cache'': The 'INFORMATION_SCHEMA.SESSION_VARIABLES' feature is disabled; see the documentation for 'show_compatibility_56' (3167)

解决

mysql> show variables like '%show_compatibility_56%';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| show_compatibility_56 | OFF   |
+-----------------------+-------+
1 row in set (0.01 sec)

mysql> 
mysql> 
mysql> set global show_compatibility_56=on;
Query OK, 0 rows affected (0.00 sec)

mysql> 
mysql> 
mysql> show variables like '%show_compatibility_56%';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| show_compatibility_56 | ON    |
+-----------------------+-------+
1 row in set (0.00 sec)

mysql> 

备份成功

原文地址:https://www.cnblogs.com/DBABlog/p/12926945.html