Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Ubuntu 12.04 server running MySQL 5.5.

How can I install MySQL 5.1 or 5.0 on it?

I have tried some commands:

apt-get install mysql-server-5.1
apt-get install mysql-server

None worked...I googled for hints, but no success.

Thank you.

share|improve this question
up vote 1 down vote accepted

Solution provided by STEVEN MARTIN (MySQL expert)

1º Step:

Completely remove old mysql installation:

sudo apt-get purge mysql-server mysql-common

2º Step:

Download MySQL 4.1 sources in order to build it and install.


3º Step:

Run these commands to uncompress and build sources and then install:

sudo tar -xvzf mysql-4.1.24.tar.gz --directory=/usr/local/src
cd /usr/local/src/mysql-4.1.24/
sudo groupadd mysql
sudo useradd -g mysql mysql
sudo apt-get install
sudo ./configure --prefix=/usr/local/mysql
sudo make
sudo mkdir /usr/local/mysql
sudo mkdir /usr/local/mysql/include
sudo mkdir /usr/local/mysql/include/mysql
sudo mkdir /usr/local/mysql/lib
sudo mkdir /usr/local/mysql/lib/mysql
sudo mkdir /usr/local/mysql/share
sudo mkdir /usr/local/mysql/man
sudo mkdir /usr/local/mysql/mysql-test
sudo checkinstall
    mysql-server 4.1.24
dpkg -l | grep -i mysql
sudo cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql/
bin/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql var
sudo chgrp -R mysql .
bin/mysql --version
bin/mysql_install_db --user=mysql
sudo bin/mysqld_safe user=mysql &
share|improve this answer

Uninstall the currently installed version and download version 5.1 from here.

share|improve this answer
How to uninstall? – Darkeden Feb 8 '13 at 18:36
@Darkeden with apt-get remove – user1301428 Feb 8 '13 at 18:39
I did removed as you told me ... Now at the installation step I get this error: Installing MySQL system tables... 130208 12:42:12 [ERROR] An old style --language value with language specific part detected: /usr/share/mysql/english/ 130208 12:42:12 [ERROR] Use --lc-messages-dir without language specific part instead. – Darkeden Feb 8 '13 at 18:42
@Darkeden googling around a bit I've found this page, which you might find useful: – user1301428 Feb 8 '13 at 18:54
Useless...I need a proper guide for completely unninstalling MySQL 5.5 and then installing 5.1 – Darkeden Feb 8 '13 at 23:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .