Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 mysql.com 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
3  
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
1  
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

1 Answer 1

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 "http://packages.ubuntu.com/" $5 "/" $6 "/" $2 "/download" }'

This generates a list like this:

http://packages.ubuntu.com/maverick/all/libnet-daemon-perl/download
http://packages.ubuntu.com/maverick/all/libplrpc-perl/download
http://packages.ubuntu.com/maverick/i386/libdbi-perl/download
http://packages.ubuntu.com/maverick/i386/libdbd-mysql-perl/download
http://packages.ubuntu.com/maverick-updates/i386/mysql-client-core-5.1/download
http://packages.ubuntu.com/maverick-updates/i386/mysql-client-5.1/download
http://packages.ubuntu.com/maverick-updates/i386/mysql-server-core-5.1/download
http://packages.ubuntu.com/maverick-updates/i386/mysql-server-5.1/download
http://packages.ubuntu.com/maverick/all/libhtml-template-perl/download
http://packages.ubuntu.com/maverick-updates/all/mysql-server/download

Those links will take you to the packages.ubuntu.com 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

 
discard

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.