Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 just installed Ubuntu 12.04 at work, which runs very well. Unfortunately, for work reasons, I need to use mysql version 5.1. I can't find a clean way of installing it. I must install it the usual way because we have scripts that rely on the ubuntu standard installation paths and directories. I would avoid to downgrade my distro (and I have no time to do it). Can you please point out a good way of doing this?

share|improve this question

MySQL Sandbox seems to be a viable solution in your case.

share|improve this answer
Package mysql-server-5.1 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: mysql-server-core-5.5:i386 mysql-server-5.5:i386 mysql-server-core-5.5 mysql-server-5.5 E: Package 'mysql-server-5.1' has no installation candidate – gotch4 Jul 17 '12 at 14:01
Man, this doesn't work! – gotch4 Jul 18 '12 at 8:52
-1, this does not work. MySQL 5.1 was removed from the precise repositories, as Ubuntu only wants to support one version of MySQL per release. – SpamapS Jul 19 '12 at 18:29
Oops.. I'll delete – SirCharlo Jul 19 '12 at 18:30

Your best bet is to keep using the release of Ubuntu that your scripts expect. Perhaps you can make use of LXC containers to get this done in a lightweight manner. If your scripts are meant for lucid:

sudo apt-get install lxc
lxc-create -t ubuntu -n my-lucid-box -- -r lucid --bindhome myuser

This will create an empty shell container (like a VM, but using the kernel for isolation instead of true virtualization) and bind it to the lxcbr virtual network. It will have your home dir mounted and your user copied in so you can ssh in w/ any keys from ~/.ssh/authorized_keys.

You can start it then with 'sudo lxc-start -n my-lucid-box' and login and install mysql-5.1, which will now be listening on the container's IP (usually in some 10.x.x.x range).

The best part about this is the container is isolated from your working system (except /home/youruser, be careful there!), so when you're done, just lxc-destroy -n my-lucid-box and its all gone (don't worry, it won't remove your home dir).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.