Mysql database has issues and the log file contained following error codes
150924 14:11:17 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
150924 14:11:17 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
Even though the service shows up and running no database interactions were possible. After searching for 'mysql_upgrade' I was able to find out that this is due to MySQL schema storage is broken. These reasons may be:
All references were guided to run mysql_upgrade as the root.
mysql_upgrade -u root -p
*Please note that the root user here is the mysql root user and the password, not the system root
Then the system will prompt for the database root user's password.
When the mysql_upgrate executed, it will check for the compatibility of the databases and tables with the current MySQL version and repair if inconsistency is available. After successful command run, you need to restart the mysql service. Also check the log file for any errors (/var/log/mysqld.log)
Good References:
* https://dev.mysql.com/doc/refman/5.5/en/mysql-upgrade.html
*http://serverfault.com/questions/527422/mysql-upgrade-is-failing-with-no-real-reason-given
150924 14:11:17 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
150924 14:11:17 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
150924 14:11:17 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
Even though the service shows up and running no database interactions were possible. After searching for 'mysql_upgrade' I was able to find out that this is due to MySQL schema storage is broken. These reasons may be:
- You have broken the database
information_schema
- File system corrupted or some bugs in the file system damaged the database.
- MySQL internals broke the schema database due to a bug in MySQL (maybe nobody encountered it before).
All references were guided to run mysql_upgrade as the root.
mysql_upgrade -u root -p
*Please note that the root user here is the mysql root user and the password, not the system root
Then the system will prompt for the database root user's password.
When the mysql_upgrate executed, it will check for the compatibility of the databases and tables with the current MySQL version and repair if inconsistency is available. After successful command run, you need to restart the mysql service. Also check the log file for any errors (/var/log/mysqld.log)
Good References:
* https://dev.mysql.com/doc/refman/5.5/en/mysql-upgrade.html
*http://serverfault.com/questions/527422/mysql-upgrade-is-failing-with-no-real-reason-given
No comments:
Post a Comment