Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 want to install MySQL but my internet connection is very slow so I decided to download the database from the MySQL site.

I have read this question, but I don't have any friends using Ubuntu.

share|improve this question
There are 2 ways of doing it. With an already installed mysql5.1 in your PC and without any other mysql installed prior to starting work with the one you downloaded. Which one do you have?. For the one that you do not have mysql install follow the install guide in the site. For the one that you have mysql5.1 already installed search in askubuntu for mysql 5.5 and you will find the guid to install it. – Luis Alvarado Mar 8 '11 at 15:08
If your internet connection is very slow, downloading it from the mysql site isn't any faster than downloading it from the package repositories. In the future, don't manually download things thinking that it will make things faster. – David Oneill Mar 8 '11 at 15:08
You do not need a friend with an Ubuntu OS, all you need is a computer with Internet connectivity. – Lekensteyn Mar 8 '11 at 15:23
I have just installed ubuntu today. I tried to configure my usb modem to be connected to the internet, but have not been able too. so I download the database from windows, and tried to install it from ubuntu. – adisembiring Mar 8 '11 at 15:52
up vote 4 down vote accepted

Well I thought this was an interesting problem. There are things like apt-offline that will help you if you have another Ubuntu machine connected to the internet (strongly suggest looking into it if you do) but there isn't much I can see to help people who are stuck needing packages of things.

And yes, I do think the packages are worth the effort in this case. MySQL is a hard thing to install well manually. There's a lot of configuration that dpkg handles for you with the ubuntu packages.

So I've written this one-line script. Give it a package to install (in this case mysql-server) and it'll use your local apt-get database in simulate mode to work out what packages it needs. You might be able to get away without an updated package list, but I strongly suggest you run sudo apt-get update before running this (you'll need some bandwidth for that).

apt-get install -qs mysql-server | grep "Inst " | awk 'BEGIN { FS="[ \(\)\[\]\/]+" } { print "" $5 "/" $6 "/" $2 "/download" }'

This generates a list like this:

Those links will take you to the website where you can download the packages (at their right versions). Unfortunately, this is a little bit manual and the website is pretty slow. People might be able to improve my script to provide direct download links to the packages.

Once you have the packages and you're back on your low-bandwidth system, either stick them in /var/cache/apt/archives/ and run the standard sudo apt-get install mysql-server or simply cd into the directory where the packages are and run `sudo dpkg -i *.deb"

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.