mysql 3167錯誤的解決方案

現象:查看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的問題,此解決方案應該也是可以,不妨一試^_^**

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章