View Single Post
Old 10-19-2007, 07:46 PM   #1 (permalink)
Critic
Administrator
 
Critic's Avatar
 
Join Date: Aug 2007
Location: Australia
Posts: 125
Critic is a jewel in the roughCritic is a jewel in the roughCritic is a jewel in the roughCritic is a jewel in the rough
Default How to move large mySQL databases

Database importing and exporting is usually pretty easy using phpMyAdmin. But what is the database takes too long to import and phpMyAdmin times out? Also phpMyAdmin only takes files sizes up to 2mb.

I found a near little script called bigdump that takes care of importing large sql files for you.

This little script can be used to import your large mySQL dumps into a new db with ease. I'll run you through how to use it:

Here's how to do it:

-To begin with, you're going to have to export your old database to either a .sql file or .tar.gz. You can do this by using the export functions in phpMyAdmin.

-OK, so you have your database dump. Now go and download BigDump. Unzip the archive to a directory on your local computer.

-Now, login to your new server and create a directory in your html directory (usually public_html) called dump. Change the permissions to 777.

-Open up bigdump.php that your unzipped from the file you downloaded. At the top of the file, add your database login information (it's clearly marked in the file).

-Upload bigdump.php and your database dump into your dump/ directory.

-Go to your browser (hopefully it's Firefox, if not upgrade!) and load the bigdump.php script.

-Click start, and away you go! It should only take about 30 seconds to import a 20mb file. There you go, that's the easy way of uploading a large database to new server.


Enjoy!
Critic is offline   Reply With Quote