Todd's MySQL Blog

Tiny tidbits of trivia from Todd

mysql_upgrade is now version-specific by default

You’ve just completed an upgrade from MySQL 5.5 to 5.6.  You followed the upgrade instructions in the manual, and ran mysql_upgrade.  But when you start MySQL 5.6, you still see the following error messages like the following in the server error log:

2013-03-26 16:45:51 5040 [ERROR] Column count of mysql.events_waits_current is w
rong. Expected 19, found 16. Created with MySQL 50520, now running 50610. Please
use mysql_upgrade to fix this error.
2013-03-26 16:45:51 5040 [ERROR] Column count of mysql.events_waits_history is w
rong. Expected 19, found 16. Created with MySQL 50520, now running 50610. Please
use mysql_upgrade to fix this error.

What went wrong?

Well, because mysql_upgrade is a client that’s built for a specific server version, it’s possible you have two different mysql_upgrade binaries on your system – one for the  old 5.5, and another for the new 5.6 server.  Unless you are very careful, it’s possible to accidentally run the mysql_upgrade binary from the 5.5 distribution against the 5.6 server, which won’t do anything useful at all.

To help prevent this, mysql_upgrade binaries from version 5.6.12 onward will explicitly check the server version connected to and compare it against the version for which mysql_upgrade was compiled.  If they don’t match, mysql_upgrade will generate an error and stop.  If you’re confident that the mysql_upgrade binary in use is the one you mean to use, even if it doesn’t match the server version against which you are using it, you can bypass the version check by including the new –skip-version-check option.

Naturally, the vast majority of the many bug fixes and improvements released to the MySQL community in 5.6.12 were implemented by MySQL Engineering staff, but in this case, the MySQL Support Team got into the act as well.  This new functionality was implemented by Sinisa Milivojevic, a longtime MySQL Support guru who will tell you he was – and is – the very first MySQL employee.  Thanks Sinisa!

Single Post Navigation

Leave a Reply

Your email address will not be published. Required fields are marked *


2 × = four

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>