Downgrade MySQL 5.x to MySQL 4.x on Ubuntu Server

No Comments

If you ever need to downgrade from MySQL 5.x to MySQL 4.x (hope you don’t), chances are you are going to run into a problem with apt-get. You will most likely receive cryptic, unhelpful dpkg errors.

If this is the case, try the command below.

sudo aptitude purge mysql-common mysql-client mysql-server && sudo aptitude install mysql-server-4.1 mysql-client-4.1

This should purge whatever is left of the MySQL 5.x installation, and then install the MySQL 4.x version. If this fails, proceed to bang head against nearest hard object.

List Installed Packages w/ Ubuntu

No Comments

This trick comes in real handy if you need to reinstall your Ubuntu/Debian system, or install your preferred software automatically with a fresh install.

From the system with your desired software:

    dpkg --get-selections > mysoftwarelist.txt

To the reinstalled or fresh system:

    dpkg --set-selections mysoftwarelist.txt
    sudo dselect