[How to] Import SQL DataBase Bigger than 100MB

Mr.Profit

Regular Member
Joined
Dec 22, 2009
Messages
221
Reaction score
481
Hello BHW,

Just few minutes ago I had to move one of my blogs from one hosting to another (both shared) and it turned out that the maximum import limit of SQL DB is 100MBs which was a problem for me, because my DB was bigger than that.

I didn't want to chop the DB (mainly because I have never done this before), and I didn't want to contact support either, because the support of the hosting I've moved the blog to is ... not that good at least to say.


So I began for searching for other solution and after few minutes I stumbled upon this script:
Code:
http://www.ozerov.de/bigdump/
Direct Download:
Code:
http://www.ozerov.de/bigdump.zip
This script automatically chops and uploads your DB to the new hosting without you doing anything besides changing some settings for the script to be able to .

So, although it's self explanatory script here are the steps you need to take:

1) Download your DB and files form the OLD hosting (Preferably via BACKUP)
2) Upload all your files to the new hosting (Don't forget to change DNS records for the domain too)
2.1) Upload your SQL DB file to the same directory you've uploaded your files on the NEW Hosting
3) Download Big Dump
4) Edit bigdump.php as required using your favorite PHP Editor (hint Notepad++ will do), e.g:

PHP:
......
// Database configuration

$db_server   = 'localhost'; //unless you use remote DB connection don't change this
$db_name     = ''; //The name of your DB on the NEW hosting
$db_username = ''; //The username to access the DB on your NEW hosting
$db_password = '';  //Password for the DB on the NEW Hosting

// Other settings (optional)

$filename           = '';     // Specify the dump filename to suppress the file selection dialog;  
//THE ABOVE IS THE FULL FILE NAME of your SQL DB dump file!!!
...........
5) Upload bigdump.php TO THE SAME FOLDER as the SQL DB Dump FILE!!!!

6) Access bigdump.php on your domain from any Web Browser, e.g.
Code:
http://my-domain-name.com/bigdump.php

You will be presented with the following picture (or similar):
bigdump.png


7) Click on Start Import

8) If everything is done correctly your blog should be up and running in few minutes (for me it was like 20 seconds, but it depends on your SQL DB size)


There's an explanation how to use the bigdump.php file in the file itself, but I hope this tutorial will help less experienced users.

Happy moving everyone!

Kind Regards,
Mr.Profit
 
Last edited:
or you can use mysqldumper http://www.mysqldumper.net/

Maybe you could, BUT this is not the purpose of this tutorial thread.

MySQLDumper is used to backup and restore your SQL DBs, and could be used for moving, but that's not the main purpose of the tool.

On the other hand MySQLDumper has a feature to SPLIT the DBs to smaller files, and that's why it's irrelevant to this thread.

What I tried to do is to give a solution to somone who didn't use this tool you are speaking nor has spitted the DB when he should have.

Thanks for your reply though.

Regards,
Mr.Profit
 
Had this issue when I change servers. Thanks for the link. Think I will do a backup right now, just cus.
 
Bookmarked, that will help next time I might change my hosting.
 
Had this issue when I change servers. Thanks for the link. Think I will do a backup right now, just cus.

Bookmarked, that will help next time I might change my hosting.

You are welcome guys! It really is pain to move one hosting to other, and when you have even more roadblocks it can get ugly pretty quickly.

I'm glad that this thread was not just a waste of web space ;)

Regards,
Mr.Profit
 
Yep, also used bigdump before, it was a great help. Thanks for the reminder
 
Back
Top