下午重启WAMP,结果发现MySQL重启报错,无法正常使用。报错提示 两数据库mysql 和 performance_schema 表结构有错误。使用mysiamchk 修复时提示不是MyISAM表,修复失败。想起上午安装过Windows (x86, 32-bit), MSI Installer Connector-ODBC,电脑装的WAMP套件MYSQL是5.6,官网没有给5.6的ODBC,所以下的是上面最新的那个5.25版本。安装的时候也想过版本不对,安装ODBC过程没有报错。现在卸载这个ODBC,重启MySQL还是这个报错。环境:WampServer Version 2.4
套件:Apache : 2.4.4 MySQL : 5.6.12 PHP : 5.4.16 PHPMyAdmin : 4.0.4 SqlBuddy : 1.3.3 XDebug : 2.2.3
MYSQL重启报错内容:2013-08-21 18:01:01 3036 [Note] Plugin 'FEDERATED' is disabled.
2013-08-21 18:01:01 3036 [Note] InnoDB: The InnoDB memory heap is disabled
2013-08-21 18:01:01 3036 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2013-08-21 18:01:01 3036 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-08-21 18:01:01 3036 [Note] InnoDB: Not using CPU crc32 instructions
2013-08-21 18:01:01 3036 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-08-21 18:01:01 3036 [Note] InnoDB: Completed initialization of buffer pool
2013-08-21 18:01:01 3036 [Note] InnoDB: Highest supported file format is Barracuda.
2013-08-21 18:01:01 3036 [Note] InnoDB: 128 rollback segment(s) are active.
2013-08-21 18:01:01 3036 [Note] InnoDB: Waiting for purge to start
2013-08-21 18:01:01 3036 [Note] InnoDB: 5.6.12 started; log sequence number 230950098
2013-08-21 18:01:03 3036 [Note] Server hostname (bind-address): '*'; port: 3306
2013-08-21 18:01:06 3036 [Note] IPv6 is not available.
2013-08-21 18:01:06 3036 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
2013-08-21 18:01:06 3036 [Note] Server socket created on IP: '0.0.0.0'.
2013-08-21 18:01:06 3036 [Warning] Info table is not ready to be used. Table 'mysql.slave_master_info' cannot be opened.
2013-08-21 18:01:06 3036 [Warning] Info table is not ready to be used. Table 'mysql.slave_relay_log_info' cannot be opened.
2013-08-21 18:01:06 3036 [ERROR] Column count of mysql.events_waits_current is wrong. Expected 19, found 16. Created with MySQL 50524, now running 50612. Please use mysql_upgrade to fix this error.
2013-08-21 18:01:06 3036 [ERROR] Column count of mysql.events_waits_history is wrong. Expected 19, found 16. Created with MySQL 50524, now running 50612. Please use mysql_upgrade to fix this error.
2013-08-21 18:01:06 3036 [ERROR] Column count of mysql.events_waits_history_long is wrong. Expected 19, found 16. Created with MySQL 50524, now running 50612. Please use mysql_upgrade to fix this error.
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Incorrect definition of table performance_schema.events_waits_summary_by_thread_by_event_name: expected column 'THREAD_ID' at position 0 to have type bigint(20), found type int(11).
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Column count of mysql.file_summary_by_event_name is wrong. Expected 23, found 5. Created with MySQL 50524, now running 50612. Please use mysql_upgrade to fix this error.
2013-08-21 18:01:06 3036 [ERROR] Column count of mysql.file_summary_by_instance is wrong. Expected 25, found 6. Created with MySQL 50524, now running 50612. Please use mysql_upgrade to fix this error.
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Incorrect definition of table performance_schema.mutex_instances: expected column 'LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'objects_summary_global_by_type' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Incorrect definition of table performance_schema.rwlock_instances: expected column 'WRITE_LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Column count of mysql.threads is wrong. Expected 14, found 3. Created with MySQL 50524, now running 50612. Please use mysql_upgrade to fix this error.
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_current' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_digest' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'users' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
2013-08-21 18:01:06 3036 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure
2013-08-21 18:01:06 3036 [Note] Event Scheduler: Loaded 0 events
2013-08-21 18:01:06 3036 [Note] wampmysqld: ready for connections.
Version: '5.6.12-log'  socket: ''  port: 3306  MySQL Community Server (GPL)performance_schemaMYSQLmyisamchk无法启动

解决方案 »

  1.   

    检查一下你的my.ini 应该是datadir 指向的路径不正确。
      

  2.   

     run mysql_upgrade after starting the server to ensure that the performance_schema database exists with all current tabls
    http://dev.mysql.com/doc/refman/5.5/en/performance-schema-build-configuration.html
      

  3.   

    使用 mysql_upgrade 之后没有那个报错提示了,但是还有一个错误,无法开启wamp。
    2013-08-22 10:16:31 5088 [Note] Plugin 'FEDERATED' is disabled.
    2013-08-22 10:16:31 5088 [Note] InnoDB: The InnoDB memory heap is disabled
    2013-08-22 10:16:31 5088 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    2013-08-22 10:16:31 5088 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2013-08-22 10:16:31 5088 [Note] InnoDB: Not using CPU crc32 instructions
    2013-08-22 10:16:31 5088 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2013-08-22 10:16:31 5088 [Note] InnoDB: Completed initialization of buffer pool
    2013-08-22 10:16:31 5088 [Note] InnoDB: Highest supported file format is Barracuda.
    2013-08-22 10:16:31 5088 [Note] InnoDB: 128 rollback segment(s) are active.
    2013-08-22 10:16:31 5088 [Note] InnoDB: Waiting for purge to start
    2013-08-22 10:16:31 5088 [Note] InnoDB: 5.6.12 started; log sequence number 230980069
    2013-08-22 10:16:31 5088 [Note] Server hostname (bind-address): '*'; port: 3306
    2013-08-22 10:16:34 5088 [Note] IPv6 is not available.
    2013-08-22 10:16:34 5088 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    2013-08-22 10:16:34 5088 [Note] Server socket created on IP: '0.0.0.0'.
    2013-08-22 10:16:34 5088 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=VBGH6JS6Y0ZVABN-relay-bin' to avoid this problem.
    2013-08-22 10:16:34 5088 [Note] Event Scheduler: Loaded 0 events
    2013-08-22 10:16:34 5088 [Note] wampmysqld: ready for connections.
    Version: '5.6.12-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
    2013-08-22 10:17:08 5088 [Note] wampmysqld: Normal shutdown2013-08-22 10:17:08 5088 [Note] Giving 0 client threads a chance to die gracefully
    2013-08-22 10:17:08 5088 [Note] Event Scheduler: Purging the queue. 0 events
    2013-08-22 10:17:08 5088 [Note] Shutting down slave threads
    2013-08-22 10:17:08 5088 [Note] Forcefully disconnecting 0 remaining clients
    2013-08-22 10:17:08 5088 [Note] Binlog end
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'partition'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_FT_DELETED'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_METRICS'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_CMPMEM'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_CMP_RESET'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_CMP'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_LOCKS'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'INNODB_TRX'
    2013-08-22 10:17:08 5088 [Note] Shutting down plugin 'InnoDB'
    2013-08-22 10:17:08 5088 [Note] InnoDB: FTS optimize thread exiting.
    2013-08-22 10:17:08 5088 [Note] InnoDB: Starting shutdown...
    2013-08-22 10:17:09 5088 [Note] InnoDB: Shutdown completed; log sequence number 230980079
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'BLACKHOLE'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'ARCHIVE'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'MRG_MYISAM'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'MyISAM'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'MEMORY'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'CSV'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'sha256_password'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'mysql_old_password'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'mysql_native_password'
    2013-08-22 10:17:09 5088 [Note] Shutting down plugin 'binlog'
    2013-08-22 10:17:09 5088 [Note] wampmysqld: Shutdown complete2013-08-22 10:17:27 4616 [Note] Plugin 'FEDERATED' is disabled.
    2013-08-22 10:17:27 4616 [Note] InnoDB: The InnoDB memory heap is disabled
    2013-08-22 10:17:27 4616 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    2013-08-22 10:17:27 4616 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2013-08-22 10:17:27 4616 [Note] InnoDB: Not using CPU crc32 instructions
    2013-08-22 10:17:27 4616 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    2013-08-22 10:17:28 4616 [Note] InnoDB: Completed initialization of buffer pool
    2013-08-22 10:17:28 4616 [Note] InnoDB: Highest supported file format is Barracuda.
    2013-08-22 10:17:28 4616 [Note] InnoDB: 128 rollback segment(s) are active.
    2013-08-22 10:17:28 4616 [Note] InnoDB: Waiting for purge to start
    2013-08-22 10:17:28 4616 [Note] InnoDB: 5.6.12 started; log sequence number 230980079
    2013-08-22 10:17:28 4616 [Note] Server hostname (bind-address): '*'; port: 3306
    2013-08-22 10:17:30 4616 [Note] IPv6 is not available.
    2013-08-22 10:17:30 4616 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
    2013-08-22 10:17:30 4616 [Note] Server socket created on IP: '0.0.0.0'.
    2013-08-22 10:17:30 4616 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=VBGH6JS6Y0ZVABN-relay-bin' to avoid this problem.
    2013-08-22 10:17:31 4616 [Note] Event Scheduler: Loaded 0 events
    2013-08-22 10:17:31 4616 [Note] wampmysqld: ready for connections.
    Version: '5.6.12-log'  socket: ''  port: 3306  MySQL Community Server (GPL)2013-08-22 10:16:34 5088 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! 2013-08-22 10:17:30 4616 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=VBGH6JS6Y0ZVABN-relay-bin' to avoid this problem.