For debian/ubuntu users who want to use MySQL 5.1, there aren’t really many options available apart from compiling from source.
Whilst this is probably the best solution, a far simpler and easier (no need to worry about things like the client) method is using the repositories from dotdeb.org. Although these are made for debian installs, I tried it earlier on ubuntu 8.10 and it worked without any problems. As usual, back up your data first!
Assuming you’ve got mysql-server-5.0 installed (although if you don’t have the server installed at all it should still work), here are the steps to get 5.1.
First, you need to edit /etc/apt/sources.list and add the dotdeb repository. This is the line you need to add for Lenny, but just change it to Etch if you haven’t upgraded yet (see my earlier post if you want to know how to do that)
deb http://packages.dotdeb.org lenny all
Then, update…
apt-get update
And then install 5.1
apt-get install mysql-server-5.1
This should also install the dependancies: libmysqlclient16, mysql-client-5.1, and update mysql-common. If you already have 5.0 installed, this will also remove the server and client for it.
If you get a message saying that packages can’t be authenticated, it isn’t anything to worry about. Just select ‘y’ and continue. After the install is complete, you should have MySQL 5.1 installed with the most useful engines:
Server version: 5.1.32-0.dotdeb.0 (Debian)
You can also use the dotdeb repositories to upgrade to the latest versions of apache, and php.
It’s probably worth reading this guide on apt pinning, which is the best way to maintain a system using repositories with different versions of the same packages.







