How to Import large MySQL database to phpMyAdmin
Submitted by Jhun Vert on December 29, 2012 - 4:57pm
Unable to import that large MySQL database into phpMyAdmin? There are reasons why you simply can't import your large MySQL database; browser timeout, server timeout, file size limit, and phpMyAdmin limit are the most common. These are real pains that cannot be avoided specially in shared web hosting. But stop pulling hairs, there are many proven ways to import your large database. In this discussion, I will only share two ways in which I have a first hand experience.
Contact your webhost
This is the best way to do this. Upload your backup to one of the directories of your website then ask your webhost to restore it for you. In most cases, this is the only thing you need to do. Most webhost will import your database for free if the amount of time to do it is considerably minimal. You can then check if the the import process was successful by browsing inside phpMyAdmin.
Use BigDump php script
Login to your cPanel and click the mySQL® Databases.
Create New Database
Add New User
Add User To Database
Now that your database container is ready, go to http://www.ozerov.de/bigdump.php and download the zip BigDump file. Extract it to your computer and open the bigdump.php using any code editing tool. I am currently using Notepad++ for editing codes.
Go to line 38 of bigdump.php and supply the following information:
\$db_server = 'localhost';
\$db_name = 'cpanel23_dbname';
\$db_username = 'cpanel23_usrname';
\$db_password = 'F8.q~,\$;#TmY';
\$filename = 'example-db-backup.sql.gz';
Note that the supplied values were just taken from the examples above.
Upload bigdump.php and your MySQL database backup to public_html of your website then open bigdump.php with your browser. Example: http://www.example.com/bigdump.php. Follow the onscreen instruction and your done.
A faster way to import your database is via Linux command line. It is easier to do and more relaible. See this post: http://www.mathalino.com/blog/romel-verterra/how-backup-and-restore-mysq...
Subscribe to MATHalino.com on