MySQL Update – MySQL Upgrade

mysql update

MySQL update process some times create issues like, MySQL server doesn’t start.

when you perform MySQL update using

yum update

or

yum update mysql

or

yum update mysql-server

before restarting or stopping server  , you need to run command

mysql_upgrade

or

mysql_upgrade -uroot -p

MySQL Update Errors

some time mysql server stop and doesn’t start and you are unable to perform mysql_upgrade command,

you get error like this in mysql logs  /var/log/mysqld.log

[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

[ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.

[ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
[ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
[ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
[ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
[ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
[ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
[ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
[ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
[ERROR] Native table 'performance_schema'.'threads' has the wrong structure
[ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
[ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
[ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
[ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
[ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
[ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
[ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
[ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
[ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure

in that case first start mysql server in safe mode and then perform mysql_upgrade like this.

mysqld_safe --skip-grant-tables

mysql_upgrade -uroot -p

Supported MySQL Update Paths

  • MySQL Update from a release series version to a newer release series version is supported. For example, MySQL Update from 5.6.26 to 5.6.27 is supported. Skipping release series versions is also supported. For example, upgrading from 5.6.25 to 5.6.27 is supported.
  • MySQL Update one release level is supported. For example, upgrading from 5.5 to 5.6 is supported. MySQL Update to the latest release series version is recommended before upgrading to the next release level. For example, upgrade to the latest 5.5 release before upgrading to 5.6.
  • MySQL Update more than one release level is supported, but only if you upgrade one release level at a time. For example, MySQL Update from 5.1 to 5.5, and then to 5.6. Follow the upgrade instructions for each release, in succession.
  • Direct MySQL Update that skip a release level (for example, MySQL Update directly from MySQL 5.1 to 5.6) are not recommended or supported.


                        

Related Posts