[SOLVED] mysql-server5.1.5.141-3ubuntu12.1 hangs on upgrade

There are a lot of words about the MySQL upgrade on Ubuntu 10.04 (64 bit specifically, perhaps the 32bit version too?) — it just hangs:

You get the hopeful message:

Preparing to replace mysql-server-5.1 5.1.41-3ubuntu12.1

but then nothing happens and everything just hangs.

Seems like the issue is related to the install script — it’s trying to switch off mysql which may be running (but the script doesn’t get the proper reply to a stop mysql command), so the solution is as follows:

/etc/init.d/mysql start (the service mysql start did not do me any good…)

sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get install --reinstall mysql-server-5.1

And hey presto, installation completes successfully and upgrade occurs. No need to modify the my.cnf file (as some recommend). Info gleened from a variety of sources.