mysql 3167错误的解决方案

来源:互联网 发布:淘宝客服每人的数据 编辑:程序博客网 时间:2024/05/16 06:28

现象:查看information_schema库下的GLOBAL_VARIABLES表和GLOBAL_STATUS表时提示:
这里写图片描述
注:查看
这个错误是在mysql5.7.6以后才出现的,因为从5.7.6以后,information_schema.global_status已经开始被舍弃,但是为了和以前版本的兼容性,设置了个选项,要想查看status项,需要开户show_compatibility_56选项(off变为on)
先查看下show_compatibility_56的值

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

打开show_compatibility_56项

mysql> set global show_compatibility_56=on;Query OK, 0 rows affected

再来查看下show_compatibility_56项

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

现在,你再去查看information_schema库下的GLOBAL_VARIABLES表就看到值了,如果没有的话,就重启连接下mysql

注:如果在其它操作遇到3167的问题,此解决方案应该也是可以,不妨一试^_^**

0 0
原创粉丝点击