mysql启动:[ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
环境:contos 6.3 mysql 5.5.40
问题:
MYSQL启动时查看myslq日志( vi /var/log/mysqld.log
)记录错误:
150628 16:48:10 [Note] /usr/sbin/mysqld: Normal shutdown
150628 16:48:10 [Note] Event Scheduler: Purging the queue. 0 events
150628 16:48:10 InnoDB: Starting shutdown...
150628 16:48:12 InnoDB: Shutdown completed; log sequence number 3615226
150628 16:48:12 [Note] /usr/sbin/mysqld: Shutdown complete
150628 16:48:12 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150628 16:48:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150628 16:48:22 [Note] Plugin 'FEDERATED' is disabled.
150628 16:48:22 InnoDB: The InnoDB memory heap is disabled
150628 16:48:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150628 16:48:22 InnoDB: Compressed tables use zlib 1.2.3
150628 16:48:22 InnoDB: Using Linux native AIO
150628 16:48:22 InnoDB: Initializing buffer pool, size = 128.0M
150628 16:48:22 InnoDB: Completed initialization of buffer pool
150628 16:48:22 InnoDB: highest supported file format is Barracuda.
150628 16:48:22 InnoDB: Waiting for the background threads to start
150628 16:48:23 InnoDB: 5.5.40 started; log sequence number 3615226
150628 16:48:23 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150628 16:48:23 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150628 16:48:23 [Note] Server socket created on IP: '0.0.0.0'.
150628 16:48:23 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
150628 16:48:23 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
150628 16:48:23 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
150628 16:48:23 [Note] Event Scheduler: Loaded 0 events
150628 16:48:23 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.40' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
根据错误提示(please run mysql_upgrade to create it)运行 mysql_upgrade
,收到以下错误:
# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed
解决方法:
以 mysql root 用户运行 mysql_upgrade
:
# mysql_upgrade -u root -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
Running 'mysqlcheck with default connection arguments
...
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Running 'mysql_fix_privilege_tables'...
OK
再次查看mysql启动日志:
150628 16:53:39 [Note] /usr/sbin/mysqld: Normal shutdown
150628 16:53:39 [Note] Event Scheduler: Purging the queue. 0 events
150628 16:53:39 InnoDB: Starting shutdown...
150628 16:53:40 InnoDB: Shutdown completed; log sequence number 3615226
150628 16:53:40 [Note] /usr/sbin/mysqld: Shutdown complete
150628 16:53:40 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150628 16:53:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150628 16:53:44 [Note] Plugin 'FEDERATED' is disabled.
150628 16:53:44 InnoDB: The InnoDB memory heap is disabled
150628 16:53:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150628 16:53:44 InnoDB: Compressed tables use zlib 1.2.3
150628 16:53:44 InnoDB: Using Linux native AIO
150628 16:53:44 InnoDB: Initializing buffer pool, size = 128.0M
150628 16:53:44 InnoDB: Completed initialization of buffer pool
150628 16:53:44 InnoDB: highest supported file format is Barracuda.
150628 16:53:44 InnoDB: Waiting for the background threads to start
150628 16:53:45 InnoDB: 5.5.40 started; log sequence number 3615226
150628 16:53:45 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150628 16:53:45 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150628 16:53:45 [Note] Server socket created on IP: '0.0.0.0'.
150628 16:53:45 [Note] Event Scheduler: Loaded 0 events
150628 16:53:45 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.40' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
引用文章:
- [修复mysql:[ERROR] Native table ‘performance_schema’](http://www.amznz.com/error-native-table-performance_schema/)