30 March 2012
When we try to import large SQL files into MySQL via phpMyAdmin, we often receive the following error message: “You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.” It simply means that the MySQL Database file is just too big to import via phpMyAdmin web interface. By default phpMyAdmin stores the upload limit in the php.ini file. We can increase the upload limit size by editing the php.ini file if we have access to it, but if the database is on a shared web hosting, we won’t have access to modify this file.
One of the popular solutions is to install Big Dump (download here 12 KB zip). What it does is stagger the database import so the server does not timeout.
- Open bigdump.php in a text editor and configure the database parameters (Server, database name, username, password, and the file name)
- Drop the old tables on the target database if your dump doesn’t contain “DROP TABLE” (via phpMyAdmin)
- Create a new folder called "dump" on the web hosting
- Upload the MySQL file and bigdump.php to the newly created "dump" folder via FTP
- Run bigdump.php from your browser (http://www.yourdomain.com/dump/bigdump.php) and import the MySQL file
- BigDump will start the import session automatically
- Wait a few moment (depends on how big the file size is) and we will see a confirmation screen
- Delete bigdump.php off your server
About Site by Tommy
Freelance web design and developer in Jakarta and Microsoft Certified Professional with five years of experience in web design and development, application development, database system, Search Engine Optimization (SEO), graphic design, logo design, business cards, corporate letterhead, posters/banners, brochures and flyers, social media marketing, and email marketing/campaign.