There might have been occasions where you had to move/copy one of your databases which are huge in size (few MBs and so on). Trying to import it normally i.e. using PHPMyAdminย isn’t a solution as it doesn’t allow you to export such huge dumps. Here’s whereย BigDumpย steps in.
BigDumpย is light weight utility which allows you to import big databases to your server. This teeny-weeny utility has been written in PHPย and comes very handy to database professionals whose most work is in PHP.
Using this utility is very easy.
- Download BigDumpย from here.
- Extract the zip folder in yourย wwwย directory.
- Now open theย bigdump.phpย script in your favorite editor and make the following changes:
// Database configuration
$db_server = ‘<your dbhost>’;
$db_name = ‘<your dbname>’;
$db_username = ‘<your db username>’;
$db_password = ‘<your db password>’;
- After this search forย ย $max_query_linesย and change it a large value, eg: 10000. This is required if you get any error while import your dump.
// How many lines may be considered to be one query (except text lines)</span>
$max_query_lines = 50000;
[/code]
- Once you have made these changes, copy your .sql dump file in the folder where you extracted BigDump.
- Open your browser and point it to the folder where bigdump.php resides. Eg.ย localhost/mysite/bigdump/bigdump.php
- You should see your dump.sql file in the list, choose that file and hit import.
- Sit back and let this magical tool cast a spell !
This tool came very handy while I was trying to import a database. Thought to share with everyone as it might be useful to many. In case of any issues, do leave your comments below ! Cheers !
Bro, there is a command mysqldump, i copy database more than a GB using it, you must give it a try !
Ohh…thanks for the info. Didn’t know about it, used this for our final year project ๐