How to Import a Large MySQL Database
A number of times I have been unable import a big database through cPanel or phpmyadmin because of its sheer size?
So, how do you import a big MySQL database?
The problem is caused by the PHP configuration file on the server, generally limiting maximum file upload size to 2mb, causing Import, Restore methods to fail.
The answer is taking a Big Dump! No, I don't mean you need to do a big poo, you need the nifty script BigDump, written by Alexey Ozerov specially for importing large databases.
-:- Go and download your BigDunp: http://www.ozerov.de/bigdump.zip
-:- Unzip it and upload both bigdump.php and your_database.sql to the same directory via ftp (Both bigdump.php and your_database.sql* MUST be uploaded with ASCII (text) mode)
-:- open bigdump.php via any editor and edit your system variables. Save it.
-:- Access via Browser your bigdump.php file: http://www.yourdomain.com/bigdump.php
-:- Now select the file to be imported from the listing of your working directory
It works with .sql and GZip but not RAR files. If you have a .rar file, unzip it and upload the .sql file. Ensure you have enough web hosting space allocated.
Be patient! DO NOT CLOSE THE BROWSER WINDOW UNTIL IMPORTING IS FINISHED. Mine simply displayed a white screen page, but all 167,468 records in one table had been imported.
Remove bigdump.php and the database.sql from server
Enjoy
KOZ
BigDump script, troubleshooting, help, FAQ, etc
BigDump: Staggered MySQL Dump Importer
