Downgrading MySQL 5.5 > 5.1 - Ubuntu 12.04

12,450

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.

wget http://mirror.provenscaling.com/mysql/community/source/4.1/mysql-4.1.24.tar.gz

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
    y
    mysql-server 4.1.24
dpkg -l | grep -i mysql
sudo cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql/
pwd
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:
12,450

Related videos on Youtube

Genesis
Author by

Genesis

Updated on September 18, 2022

Comments

  • Genesis
    Genesis over 1 year

    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.

  • Genesis
    Genesis about 11 years
    How to uninstall?
  • user1301428
    user1301428 about 11 years
    @Darkeden with apt-get remove
  • Genesis
    Genesis about 11 years
    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.
  • user1301428
    user1301428 about 11 years
    @Darkeden googling around a bit I've found this page, which you might find useful: grokbase.com/t/mysql/mysql/12bcgmxp4v/mysqld-cannot-start
  • Genesis
    Genesis about 11 years
    Useless...I need a proper guide for completely unninstalling MySQL 5.5 and then installing 5.1
  • user1301428
    user1301428 about 11 years
    @Darkeden you could also use google a bit more though, anyway here you go: ubuntuforums.org/showthread.php?t=1804209