mysql由5.1升级到5.5后,直接使用老的数据库数据虽然服务能正常启动,但是查看错误日志会有如下:
120724 5:47:39 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
修复方法很简单:
120724 5:47:39 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
120724 5:47:39 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
修复方法很简单:
- mysql_upgrade -uroot -p
编辑回复