admin管理员组

文章数量:1638805

我把数据库从5.1升级到5.7后,发现用mysql-Front远程连接时,一进去就报错

ERROR 3167 (HY000): The 'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled; see the documentation for 'show_compatibility_56'

原因是:

从mysql5.7.6开始information_schema.global_status已经开始被舍弃,为了兼容性,此时需要打开 show_compatibility_56

解决步骤:

步骤1.先查看状态:

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

发现是关闭状态,那么这里有2种办法开启,下面的步骤任选一个:

步骤2:第一种就是直接输入开启命令

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

但是这种如果服务器或者数据库重启,就失效了。为了永久解决,就去mysql的配置文件中添加一条配置

步骤2:第二种永久解决

[root@master ~]# vim /etc/myf

在配置文件内添加: show_compatibility_56 = 1然后保存,并重启mysql

 

 

本文标签: informationschemaErrordisableddocumentatioGLOBALSTATUS