Solved: Debian Squeeze – mysql-server removed during dist-upgrade

First the problem:

I’ve now upgraded 2 servers from Lenny to Squeeze and had the same problem for both. While following the official upgrade instructions everything is fine until the dist-upgrade process. During this, mysql-server-5.0 gets removed and is replaced by mysql-server-core-5.1 – I haven’t worked out what the new -core packages is meant to be used for but it isn’t a direct replacement for mysql-server so I’m not sure why it’s being installed during an upgrade.

After this, phpmyadmin gets upgraded and wants to install a configuration database but it can’t because there’s not a working mysql server so you’re forced to abort this process.

Now the solution:

Once this dist-upgrade has finished, it’s a fairly simple task of

apt-get install mysql-server


dpkg-reconfigure phpmyadmin

and everything seems fine. I haven’t lost any data in this process, just seems strange that it’s happening. It’s logged as a bug from October last year.