MySQL 5.7 show_compatibility_56

25

最近,我决定购买VPS服务器,并托管自己的论坛,因为我们已经发展到了普通共享主机平台无法满足的规模。我认为设置和运行会很容易,大部分也确实如此,但我在一个可怕的MySQL错误上遇到了瓶颈。

基本上,我正在尝试通过PHPMYADMIN上传我的旧数据库,但我一直收到相同的错误反弹。我遵循了一些优秀的指南,比如来自Digital Ocean的指南,但这个错误似乎没有太多的解释,而且我找到的信息对我也没有用。

这里是错误信息: Error SQL查询: Documentation

/*!50112 SELECT COUNT(*) INTO @is_rocksdb_supported 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE   
VARIABLE_NAME='rocksdb_bulk_load' */
MySQL said: Documentation
#3167 - The INFORMATION_SCHEMA.SESSION_VARIABLES feature is disabled; 
see the documentation for show_compatibility_56

我已经尝试在配置文件/etc/mysql/my.cnf中添加show_compatibility_56 = ON,但出现以下错误:

"Job for mysql.service failed because the control process exited with error code." 当我访问 PHPMYADMIN 时,它显示 "Connection for controluser as defined in your configuration failed."和" #2002 - No such file or directory
The server is not responding (or the local server's socket is not correctly configured)."。

我可以告诉你,show_compatibility_56被关闭了,因为在 PHPMYADMIN 中显示为关闭状态。

有人能告诉我如何打开它吗?

我正在使用 Ubuntu 16.04 和 LAMP。


你能定义“中断MYSQL”吗? - ceejayoz
是的,当我在配置文件中添加“show_compatibility_56 = ON”并尝试重新启动时,它会显示“Job for mysql.service failed because the control process exited with error code.”,而当我进入PHPMYADMIN时,它会显示“Connection for controluser as defined in your configuration failed.”和“#2002 - No such file or directory<br />The server is not responding (or the local server's socket is not correctly configured).” - CarlM24
请将该信息放在您的问题中,而不是埋在评论中。这是问题的一部分,本应该一开始就在那里。您可以在标签下方找到[编辑]链接。 - Ken White
https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_show_compatibility_56 - Ken White
我感谢你的帮助,Ken,但是你发给我的链接并不能解决我的问题。它只是告诉我有关show_compatibility_56变量的信息。 - CarlM24
3个回答

90
这是我找到的信息: 1. 问题描述:
在执行MySQL数据库备份时,备份报告中出现以下错误消息:
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE / FROM GLOBAL_STATUS': The 'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled: see the documentation for 'show_compatibility_56' (3167)
2. 原因:
show_compatibility_56已被弃用。
3. 解决方法:
在您的MySQL数据库中运行以下查询:
set @@global.show_compatibility_56=ON;

看起来问题实际上非常简单。我在PHPMYADMIN内的MYSQL控制台中运行了代码。
修复的功劳归功于这个页面:https://support.servosity.com/hc/en-us/articles/221071687-ISSUE-The-INFORMATION-SCHEMA-GLOBAL-STATUS-feature-is-disabled-see-the-documentation-for-show-compatibility-56-

6
在mysqld.cnf文件的[mysqld]部分中添加以下行:
show_compatibility_56 = On

并重新启动mysqld(对于Ubuntu,使用sudo service mysql restart


1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接