Friday, September 1, 2017

[SOLVED] ERROR 3167 (HY000) The 'INFORMATION_SCHEMA.GLOBAL_VARIABLES' feature is disabled see the documentation for 'show_compatibility_56'


You might get the error below during MySQL database restore to 5.7 and the backup taken from MySQL 5.6 server.
ERROR 3167 (HY000): The 'INFORMATION_SCHEMA.GLOBAL_VARIABLES' feature is disabled; see the documentation for 'show_compatibility_56'
To solve this issue let follow the steps below:
Step 1:- Check MySQL compatibility
By default MySQL 5.7 doesn't allow to restore 5.6 databases. For this, We need to enable MySQL 5.6 compatibility. Let's check this using command below:
mysql> SHOW VARIABLES LIKE "%compatibility%";
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| show_compatibility_56 | Off    |
+-----------------------+-------+
1 row in set (0.00 sec)

That means yours MySQL 5.7 server doesn't have enabled 5.6 database compatibility.
Step 2:- Enable MySQL 5.6 compatibility
Let's enable MySQL 5.6 compatibility so we can restore the database to MySQL 5.7 server.
mysql> SET GLOBAL show_compatibility_56 = ON;
Now MySQL5.6 compatibility has been enabled and you can restore a database that backed up from MySQL 5.6 Server.
Step 3:-  Let's validate compatibility status:
Let's hit command below to check status whether it's enabled or not.
mysql> SHOW VARIABLES LIKE "%compatibility%";
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| show_compatibility_56 | ON|
+-----------------------+-------+
1 row in set (0.00 sec)

Compatibility has been enabled successfully. Now, you can restore a database backup taken from MySQL5.6 server.

1 comment:

  1. Thanks a lot for writing and publishing this page. I was looking to enable that feature in mysql.

    ReplyDelete