Upgrading MySQL is a bit more difficult than the other upgrades, but is still simple. Don’t upgrade using the binary package as that still does not come with the proper shared libraries.

First step is to create a backup of your databases! Something might go wrong and you could loose all your data.

To upgrade your current MySQL installation you download the latest version of MySQL and follow the normal installation instructions including the ‘sudo make install‘. Make sure you use the same ./configure statement as you used earlier otherwise you might change locations of items. If you don’t remember it, here you can find the instructions.

The new version will activate when you stop MySQL. You can use the following commands to properly shut it down:

sudo mysqladmin shutdown

Due to our startup script MySQL will restart the server automatically.

To test if everything works correctly use a program or website that takes content from the database.

If something has gone wrong and you want to revert to your previous version you can go to the source directory of the previous MySQL release you had installed and execute a ‘sudo make install‘ from there and shut MySQL down again. All should be well again.

One small remark, this procedure will update the installation in ‘/usr/local/mysql‘. This won’t affect the version in the symlink which means that the version being linked isn’t the actual version.