Import Large MySQL Databases into PHPMyAdmin with BigDump.php

Mar 22 2011

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.



  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.

60 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


  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 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:


    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


  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?



  22. Tj says:

    I do not understand what it means by “Upload both your SQL file and bigdump.php to your server” — I am using xampp and a windows. When I tried to open the php file, it doesnt open on the web browser as it did in your video. Can you help!

  23. Mauro says:

    Very cool! Thanks for sharing.

  24. Shishir says:

    Hi I’m trying to upload csv file. But a SQl error occurs.

    “MySQL: Column count doesn’t match value count at row 1 ”

    I have checked the no. of columns in excel and in my dtabase table, both are same. Any suggestion ?

  25. 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.

    • makewebapp says:

      Thanks for this outstanding script.

      I had same issue, I think you uploaded the file root folder my suggestion is just CREATE a new folder and keep your dump.php and .sql file in that folder and try to run the script, it will BOOOOM.

      Thanks AGAIN.
      Cheers 🙂

  26. Aminbag says:

    Very helpfully…
    thank U so much.

  27. Carlos says:

    Hi, I’m gettin the following error message:”MySQL: Table ‘mydatabase.myfirstable’ doesn’t exist”
    How can I solve it?

    Thank you in advance!

    Carlos Romero

  28. tolga hayıt says:

    great sharing! thanks for this

  29. Gordon says:

    So grateful for this info, thank you very much..

  30. This tool should be standard with phpmyadmin. Excelent thank you!

  31. KarSho says:

    Thanks you so much

  32. Isaac says:

    I’m trying to import my database which have 760 megabite but I got this error
    “Starting from line: 1615217
    Stopped at the line 1617871.
    At this place the current query includes more than 300 dump lines. That can happen if your dump file was created by some tool which doesn’t place a semicolon followed by a linebreak at the end of each query, or if your dump contains extended inserts or very long procedure definitions. Please read the BigDump usage notes for more infos. Ask for our support services in order to handle dump files containing extended inserts.”
    Can you help me please!

  33. Jeff says:

    I know this is a super old post, but thanks so much man. I’ve spent the last hour or so trying to import a large sql dump into a wamp install and was getting nowhere. This did the trick in a matter of minutes.

  34. AEHageman says:

    Glad to see it still works!

    Thanks for the great program to upload and import a large sql export that phpmyadmin would not import.

    I used it on hostgator (for a client) and it worked.

  35. Bhavin says:

    |->Open file
    |->in the path “C:\wamp\apps\phpmyadmin” and set/add this line.
    $cfg[‘UploadDir’] = ‘upload’;

    |->Restart all services

    |->Now create upload folder inside your phpmyadmin(C:\wamp\apps\phpmyadmin4.0.4\upload) folder and put your .sql file in upload folder.

    |->Now open phpmyadmin in browser, go to import. You can see the file in dropdown just below browse button with that upload directory folder and files.

    Select it and Go…

  36. Sagar says:

    Thanks for demonstrating this. You used big sized .sql file for test. how about a big fatty xls/csv?
    It will just create a table in mysql db with almost 2000 columns and round about 100thousands of rows.
    Can you suggest me something please?

  37. Soffian says:

    I cannot download the zip file.. the website keep loading. Is there any alternative download site?

  38. Nadirshah Rahat says:

    Thanks a lot. it was save my lot of times.

  39. Pingback: Import Sql Database Hostgator – +ADw-/title+AD4-Hacked By TURKHACKTEAM.ORG Putin, knowingly and willfully planned airplane attack and the citizen on death. This has caused you to be you're a traitor. Now the citizens of nationalist feelings of the

  40. Sadia Rashid says:

    it is giving me this error :
    Error at the line 478: (443, 378, ”, ”, ‘Roger’, ‘Stooke’, ’10 Asfordby Road’, ”, ’10 Asfordby Road’, NULL, ‘LE13 0HR’, ‘Melton Mowbray’, ”, 222, 1);

    Can you please tell what can i do for it ??

  41. Vishal says:

    This is really a good programme. How can I upload large xlsx file without converting in csv. Please send some php coding to convert xlsx file automatically in csv before using bigdump programme.
    Thanks in advance

  42. Thanks a great deal. This helped a lot.

  43. Newbie says:

    Hi. This all sounds very interesting:

    Open up bigdump.php and configure: Server, database name, username, password, and the file name.
    Upload both your SQL file and bigdump.php to your server
    Browse to bigdump.php and click import

    But how does it work in Localhost? I have wordpress installed in xampp, my database is 8 MB and won’t instal. How precisely, if possible, do we instal BigDump to xampp in order to import an 8MB db in order to transfer a wordpress site from a BACKUP zip file, to a “live” Localhost site to work with offline?

    Thank you for your time.

  44. Jaap says:

    Awesome! Finally something that actually works out of the box.

    On export, I had to ensure that every record has its own query (like INSERT INTO tbl_name VALUES (1,2,3)) and that queries were not combined (like INSERT INTO tbl_naam VALUES (1,2,3), (4,5,6), (7,8,9)).

    2 192 132 queries were executed in about half an hour.

  45. Kortingcode says:

    I am truly pleased to read this blog posts which includes plenty of useful information, thanks for providing these kinds
    of statistics.

  46. Awesome, Thanks for the info!

  47. Luiz says:

    You saved me. You should put an option to Donate, because this script really saved me

  48. Mario says:

    I agree too with Luiz, You SHOULD put an option to donate!!. Its a good tool.

  49. Tigz says:

    When I try to run the php file it only displays the script in the browser. How do I get it to actually run/execute?

  50. shabnam says:


  51. Ivan Cazorla says:

    Hi there, thank you for the great tutorial. Fore whatever reason I get this error message:

    Error at the line 38: ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    Query: —

    CREATE TABLE `ps_access` (
    `id_profile` int(10) UNSIGNED NOT NULL,
    `id_tab` int(10) UNSIGNED NOT NULL,
    `view` int(11) NOT NULL,
    `add` int(11) NOT NULL,
    `edit` int(11) NOT NULL,
    `delete` int(11) NOT NULL

    MySQL: Table ‘ps_access’ already exists

    Any idea why this is happening?

  52. shyam says:

    while uploading the database getting error “504 gateway timeout” what to do please help me i got stucked.

  53. Thanks this helps me save time and import data from other databases to the new database.

  54. Za says:

    Thank you for your explanation. This post showed at the right place when I searched Google.

Leave a Reply

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