Question

Install old version of PHP & MySQL on Ubuntu 10.04 or 12.04

  • Posted July 28, 2014

I’m using Ubuntu and i want to install old version of MySQL and PHp such as MySQL 5.2 or lower and PHP 5.2 or lower because my software isn’t compatible with newer version. But i don’t know how. I tried googling but didn’t work. There’s nothing much. So plz help me :)

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The simplest way to avoid these issues is of course to try to update the software/scripts. I haven’t gone through all the changelogs from PHP 5.2 to 5.5 though I doubt a lot of changes are necessary in order to make it work with the latest version.

In case you still prefer/have to use the old versions, then you have two options:

a) Remove the current PHP/MySQL packages, locate the old versions as .deb files, install them using dpkg -i and use apt-mark hold package-name in order to avoid updates from being installed

b) Compile/download the PHP/MySQL binaries and install them manually

When it comes to the first option, you may end up having a lot of dependency problems and having to downgrade other packages. Therefore, I recommend that you stick to the second option unless you have never tried to compile a package before.