How to import Huge database in MySQL via Bigdump?

Sometimes you have import huge databases in mysql, and hard limit on most of the server does not let you do that via phpMyAdmin. There is a script(Bigdump.php) lets you import large databases into mysql. what it does is it staggers the import in multiple sessions. Script executes only small amount of data from huge sql file and restarts itself. The next session starts where last session left off.

You can download Bigdump.php from here http://www.ozerov.de/bigdump.php

What do you need…?

Download Bigdump script (bigdump.php) from the download above.

Dump file(s) of your database created by phpMyAdmin.

User Account for your MySQL database with all the privileges.

Text editor like Notepad or I like Notepad++.

FTP access to your host.

Doing it…

Now edit bigdump.php with you favorite text editor.

Modify mysql host name, username, database name, password to match your target mysql database server setup then save.

Launch FTP client create a directory on you web server I call it dump.

Give write permissions in windows or in Linux chmod 777 to newly created directory.

Upload modified bigdump.php to directory you created in last step.

Upload backup sql file same directory as bigdump.php.

Once all upload are complete launch you browser and browse to http://www.yourdomain.com/dump/bigdump.php

Now Select the file to be imported from the listing of your working directory.

Script starts staggered import from here if you have put in correct username password for my sql database.

Do not close browser just wait for it to finish.

Once import is complete remove bigdump.php from your server.

If your dump/backup file is really huge, I would recommend doing it late night.

This entry was posted on Saturday, January 10th, 2009 at 1:15 am and is filed under Database. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply