1. 程式人生 > >修復mysql:[ERROR] Native table ‘performance_schema’

修復mysql:[ERROR] Native table ‘performance_schema’

data- 驗證 eve nbsp mar usr rwlock wait 地址

轉: http://www.amznz.com/error-native-table-performance_schema/

mysql數據庫出現如下錯誤,主要是因為升級了mysql軟件包,而一些數據庫的表結構發生變化而無法正常運行。

140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘events_waits_current‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘events_waits_history‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘events_waits_history_long‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘setup_consumers‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘setup_instruments‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘setup_timers‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘performance_timers‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘threads‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘events_waits_summary_by_thread_by_event_name‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘events_waits_summary_by_instance‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘events_waits_summary_global_by_event_name‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘file_summary_by_event_name‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘file_summary_by_instance‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘mutex_instances‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘rwlock_instances‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘cond_instances‘ has the wrong structure
140213 16:55:47 [ERROR] Native table ‘performance_schema‘.‘file_instances‘ has the wrong structure

修復方法很簡單只需在root權限下運行如下命令即可:

/usr/local/mysql/bin/mysql_upgrade -u root -p

輸入命令後會要求驗證mysql密碼,填入密碼後確認如下圖所示即表示修復完畢:

技術分享

? 原文地址: http://www.amznz.com/error-native-table-performance_schema/

修復mysql:[ERROR] Native table ‘performance_schema’