Debian Lenny, Virtualmin & MySQL 5.1

Written by Peter Davies on .

If you need the latest MySQL version for having cached prepared statements, you may need to follow a process of replacing your existing server:

Edit /etc/apt/sources.list

Add the following:

deb lenny all

Do an update of the packages:

apt-get update

Watch it fail and run (replacing key with the one output from above):

gpg --keyserver --recv-key E9C74FEEA2098A6E
gpg -a --export E9C74FEEA2098A6E | apt-key add -

The a test install:

apt-get -s install mysql-server-5.1

Shows that: 2 upgraded, 4 newly installed, 3 to remove and 11 not upgraded.

You should probably stop the server if it is presently running:

/etc/init.d/mysql stop

Now run:

apt-get install mysql-server-5.1

It's possible we may need to also upgrade php5-mysql but looking at what might get updated there could be issues:

apt-get -s install php5-mysql

Stating: 8 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

In my case this will probably break the existing self-compiled php5-gd module. I have ignored this step.

Remove/comment the line from the /etc/apt/sources.list

Do an update of the packages:

apt-get update

Examine running server using phpmyadmin or mysql -v