Home > dreamhost | mysql > Downgrade to MySQL 5.0 from 5.1

Downgrade to MySQL 5.0 from 5.1

If ever a installation or upgrade to MySQL 5.1 goes wrong and you want to revert back to MySQL 5.0 by installing 5.0, you will probably run into the following nasty error message.


Unpacking mysql-server-5.0 (from …/mysql-server-5.0_5.0.51a-24+lenny5_amd64.deb) …
Aborting downgrade from (at least) 5.1 to 5.0.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.0_5.0.51a-24+lenny5_amd64.deb (–unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.0_5.0.51a-24+lenny5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

You probably get this error message when you run “sudo apt-get install mysql-server”. To fix this problem, simply run:

Warning: THIS WILL DELETE ALL YOUR DATA. Pleas backup your tables before continuing.

sudo rm -R /var/lib/mysql

this will delete the mysql data directory, which will fix the issue! continue your downgrade back to 5.0 by running:

sudo apt-get -f install

Comments:3

Leave a Reply
  1. syn4pse 11/10/04

    thanks helped me altough you should point out more clearly that they should backup their tables ;) because data will get lost

  2. Steven 11/10/04

    Hi syn4pse, good point! how can i have missed that.
    I have updated the post. thanks for pointing out.

  3. johntalvolta 14/01/07

    this will *not* delete your data

    sudo rm -R /var/lib/mysql/debian-5.1.flag
    sudo apt-get -f install

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackbacks:0

Listed below are links to weblogs that reference
Downgrade to MySQL 5.0 from 5.1 from How to Get it Working
TOP