MySQL [ERROR]本机表性能模式结构错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32000911/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
[ERROR]Native table performance schema has the wrong structure
提问by Cherry
150814 9:09:14 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
150814 9:09:14 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
150814 9:09:14 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44-cll-lve' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Atomicorp
Then I run
然后我跑
mysql_upgrade
It shows:
表明:
Looking for 'mysql' as: mysql
寻找“mysql”为:mysql
Looking for 'mysqlcheck' as: mysqlcheck
寻找“mysqlcheck”为:mysqlcheck
FATAL ERROR: Upgrade failed
致命错误:升级失败
回答by Berend de Boer
It seems this happens after you have done upgrade. Simply restart mysql:
升级完成后似乎会发生这种情况。只需重新启动mysql:
service mysql restart
and the error should now have disappeared.
并且错误现在应该已经消失了。
回答by imechemi
If you're running MySQL on your local device, you need to upgrade your mysql and then restart:
如果您在本地设备上运行 MySQL,则需要升级您的 mysql,然后重新启动:
Upgrade:
升级:
$ mysql_upgrade -u root
Restart:
重新开始:
$ mysql.server restart
回答by Roger K.
Windows7 Pro, Mysql 5.7, Java Tomcat
Windows7 专业版、Mysql 5.7、Java Tomcat
I attempted to update the mysql server from version 5.7.8 to version 5.7.18 using the Windows web updater available on Mysql.com. The new version installed, started as a service, but wouldn't serve anything including log in.
我尝试使用 Mysql.com 上提供的 Windows Web 更新程序将 mysql 服务器从 5.7.8 版更新到 5.7.18 版。新版本已安装,作为服务启动,但不会提供任何服务,包括登录。
Using the Windows command box, change directory to C:\Program Files\MySQL\MySQL Server 5.7\bin
Type: mysql_upgrade --force -u root -p
Enter the password of the previous version that is being upgraded.
Restart the Mysql service at Windows > Start > Administrative Tools > Services
使用 Windows 命令框,将目录更改为 C:\Program Files\MySQL\MySQL Server 5.7\bin
类型:mysql_upgrade --force -u root -p
输入正在升级的先前版本的密码。
在 Windows > 开始 > 管理工具 > 服务中重启 Mysql 服务
The Mysql server immediately started and connected to the Java Servlet container.
Mysql 服务器立即启动并连接到 Java Servlet 容器。
回答by Stephan
Same problem here
同样的问题在这里
$ mysqldump -h localhost --lock-all-tables --set-gtid-purged=OFF -u root -p --socket=/var/run/mysqld/mysqld.sock --all-databases > dump.sql
mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'ndbinfo\_version'': Native table 'performance_schema'.'session_variables' has the wrong structure (1682)
Have you test a
你有没有测试
$ mysql_upgrade -u root -p
or
或者
$ mysql_upgrade --force -u root -p
回答by wanggongpu
mysqldump just add parameter like this: --skip-lock-tables
mysqldump 只需添加如下参数: --skip-lock-tables
can avoid this error:
可以避免这个错误:
mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'ndbinfo\_version'': Native table 'performance_schema'.'session_variables' has the wrong structure (1682)