Wes Bos

Designer, Developer & Entrepreneur making the web an awesome place.

Screen shot 2011-03-22 at 2.14.54 PM

When migrating a site that has been around for a while, I often run into the problem where my MySQL Database is just too large to import via the web interface of PHPMyAdmin. Often times its to a server that doesn’t allow remote access to their databases. What is a poor dev to do?

Take a big dump

Although this script has been around for almost 9 years, its still an essential tool for every developers toolbox. Big Dump staggers the database import so your server does not timeout. Here is a quick tutorial on how to use Big Dump.

Video

Instructions

  1. Download the latest version of Big Dump here.
  2. Open up bigdump.php and configure: Server, database name, username, password, and the file name.
  3. Upload both your SQL file and bigdump.php to your server
  4. Browse to bigdump.php and click import

Thats it! Wait a few minutes and you will see a confirmation screen similar to the one below. Make sure to delete bigdump.php off your server when you are finished.

 

This entry was posted in PHP and tagged , , , . Bookmark the permalink.

24 Responses to Import Large MySQL Databases into PHPMyAdmin with BigDump.php

  1. Casey says:

    Very cool! I’ve never heard of this before. Thanks for sharing.

  2. Dang Thanh says:

    I usualy use Bigdump.php for large mysql database, too. Thanks…

  3. waleed says:

    thank u very much solved my problem

  4. seks says:

    Thanks for this guide. Lucky i found your tutorial. Now i can do transfer my site by myself. :)

  5. Saleem Ullah says:

    i am getting below mention error
    Fatal error: Maximum execution time of 300 seconds exceeded in C:\wamp\apps\phpmyadmin3.1.3.1\libraries\import\sql.php on line 142

    can you help in this regard, Thanks

    Saleem

  6. Emil says:

    hi, and thanks for a such a good script and tutorial.
    I try to import one database to my localhost, but I get this error:
    Error at the line 30: CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    I change the charset, but same error.
    any suggestion?
    thanks in advance :-)

  7. vikram says:

    set max time at php.ini file at your server..,you can set there in seconds..like 7200 open php.ini and find there max keyword..

  8. Touqir says:

    i am getting below mention error…

    Error at the line 22: CREATE DATABASE `celebmoo_blog` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

    Query: –

    CREATE DATABASE `celebmoo_blog` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci

    MySQL: Can’t create database ‘celebmoo_blog’; database exists

  9. EP says:

    This is great. Thank you so much.

  10. melvin says:

    Your the only one with CLEAR!! instructions on how to do this, Thanks so much I got it uploaded and working!!

  11. Amit says:

    hi. this is upload only 2 mb file i have need 5mb file.
    help be out.

  12. Nita says:

    Thanks…This is very useful script.

  13. Bachti says:

    Hi,

    please help,

    i have this problem:

    Error at the line 21: CREATE DATABASE `stephanus-bild` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

  14. LPHPFAN says:

    This is really shit. Thank you

  15. Nick says:

    It rocks mate!!!!!! Thank you!

  16. Adnan says:

    How I specify the Name of file??? With Extension and without extension?
    in Both Cases I face Error.

  17. Nishal Shah says:

    Thanks a lot..!!
    It worked like a charm..!!

  18. JimmyTeo says:

    Fatal error: Maximum execution time of 30 seconds exceeded in /home/b/public_html/bigdump.php on line 661

    Interestingly, I’m with this error, I am only help thanks

    Thanks

  19. balaji says:

    It really fantastic tool, and uploaded in simple time, Thank you once again, it really an life saver,

  20. Christiam says:

    The best way to upload big DB

  21. Belinda says:

    Hi, I need to do something like this but the database I want to import is from another website written in php, and I want to import 3 sets of post categories with up to about 50 posts in each category, into my wordpress site.

    Would you be able to offer any advice on how to do this?

    Cheers,

    Belinda

  22. Mauro says:

    Very cool! Thanks for sharing.

  23. kdavid says:

    My database is 2Gbs, any ideas? keep geting this error however my sql dump file is already uploaded to the server.

    Can’t open daily.sql for import

    Please, check that your dump file name contains only alphanumerical characters, and rename it accordingly, for example: daily.sql.
    Or, specify $filename in bigdump.php with the full filename.
    Or, you have to upload the daily.sql to the server first.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>