Mysql failed after upgrade: Table ‘mysql.plugin’ doesn’t exist

After performing a mysql upgrade, you may run into a problem where Mysql won’t start successfully and will result in a “Table ‘mysql.plugin’ doesn’t exist” error message. The mysql error logs will state something like follows:

/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
110620  01:01:01 [ERROR] Can't open the mysql.plugin table.
Please run mysql_upgrade to create it.

The solution is to run mysql_upgrade to create the mysql.plugin table but the problem is you can execute the command only when Mysql is online. Tricky situation, isn’t it?

This mostly likely happens when mysql is still using the old my.cnf file after the upgrade. The my.cnf of the new Mysql version is saved as /etc/my.cnf.rpmnew and this is the file you should be using

# cp /etc/my.cnf /etc/my.cnf.old
# cp /etc/my.cnf.rpmnew /etc/my.cnf
# /etc/init.d/mysqld start

Once Mysql is started, you can now execute mysql_upgrade:

# mysql_upgrade -uroot -p <mysqlpass>

This will create the ‘mysql.plugin’ table and will make sure the mysql database is uptodate as per the newer version.

This entry was posted on Saturday, March 24th, 2012 and is filed under Mysql & PostGres SQL. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.