mysql :Native table 'performance_schema'.'cond_instances' has the wrong structure

err:

150418 13:25:06 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'objects_summary_global_by_type' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_current' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_digest' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'users' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
150418 13:25:06 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure

有人建议使用%MYSQL%/bin/mysql_upgrade -u root –p  来修复。

但启动后仍然有如下日志:

150421 14:06:31 [Warning] InnoDB: Cannot open table mysql/gtid_slave_pos from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
150421 14:06:59 [Warning] InnoDB: Cannot open table mysql/gtid_slave_pos from the internal data dictionary of InnoDB though the .frm file for the table exists. See
http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.
150421 14:07:26 [Warning] InnoDB: Cannot open table mysql/gtid_slave_pos from the internal data dictionary of InnoDB though the .frm file for the table exists. See
http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

select table_name from information_schema.tables where table_schema='mysql' and engine='InnoDB';
+----------------------+
| table_name           |
+----------------------+
| gtid_slave_pos       |
| innodb_index_stats   |
| innodb_table_stats   |
| slave_master_info    |
| slave_relay_log_info |
| slave_worker_info    |
+----------------------+
> use mysql
> select * from gtid_slave_pos;
ERROR 1932 (42S02): Table 'mysql.gtid_slave_pos' doesn't exist in engine
> drop table gtid_slave_pos;
Query OK, 0 rows affected, 1 warning (0.00 sec)

拷贝%MYSQL%\share\mysql_system_tables.sql 中创建 gtid_slave_pos语句执行。

CREATE TABLE IF NOT EXISTS gtid_slave_pos (
  domain_id INT UNSIGNED NOT NULL,
  sub_id BIGINT UNSIGNED NOT NULL,
  server_id INT UNSIGNED NOT NULL,
  seq_no BIGINT UNSIGNED NOT NULL,
  PRIMARY KEY (domain_id, sub_id))
COMMENT='Replication slave GTID position';

ERROR 1813 (HY000): Tablespace for table '`mysql`.`gtid_slave_pos`' exists. Please DISCARD the table
space before IMPORT.

> show variables like '%data%';
+-------------------------------+--------------------------+
| Variable_name                 | Value                    |
+-------------------------------+--------------------------+
| character_set_database        | utf8                     |
| collation_database            | utf8_general_ci          |
| datadir                       | E:\database\MYSQL\       |
| innodb_data_file_path         | ibdata1:10M:autoextend   |
| innodb_data_home_dir          | E:\database\innodb_home\ |
| innodb_stats_on_metadata      | OFF                      |
| max_length_for_sort_data      | 1024                     |
| max_long_data_size            | 1048576                  |
| metadata_locks_cache_size     | 1024                     |
| metadata_locks_hash_instances | 8                        |
| myisam_data_pointer_size      | 6                        |
| skip_show_database            | OFF                      |
| updatable_views_with_limit    | YES                      |
+-------------------------------+--------------------------+

删除E:\database\MYSQL\mysql\gtid_slave_pos.*

重复gtid_slave_pos 执行创建表语句,该问题解决

转载于:https://www.cnblogs.com/storymedia/p/4444332.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值