Thu 26 Apr 2012
Ubuntu 12.04 LTS (Precise Pangolin) has updated MySQL to version 5.5, the update is not as straight forward as in other releases so some caution must be always taken.
Updating from MySQL 5.x
This is a fairly easy case, if you have any extra config in
/etc/mysql/conf.d there’s a high chance that the new package will actually uninstall your old packages without replacing them, be extremely careful with that, also check that all your parameters are in line with MySQL 5.5 syntax.
First of all once the upgrade to 12.04 is finished, check which packages for mysql-server are installed:
$ sudo dpkg -l | grep mysql-server
ii mysql-server 5.5.22-0ubuntu1 MySQL database server (metapackage depending on the latest version)
rc mysql-server-5.1 5.1.61-0ubuntu0.11.10.1 MySQL database server binaries and system database setup
ii mysql-server-5.5 5.5.22-0ubuntu1 MySQL database server binaries and system database setup
ii mysql-server-core-5.5 5.5.22-0ubuntu1 MySQL database server binaries
If you see all the 5.5 packages installed congratulations, your upgrade was flawless, but in any other case you’ll only see the mysql-server-5.1 package, so you’ll need to install manually the packages.
$ sudo apt-get install mysql-server-5.5
This should in all cases suffice to get MySQL server running again if there’s no errors in your my.cnf.
Updating from MySQL 4.x
In this case the binary structure changes slightly so you’ll need to dump all your data and upload it to a fresh new MySQL 5.5 instance, there’s not much way around this unfortunately and not following this can result in corrupt data.