Web Development

How to import large files into phpmyadmin

This is common problem when your are importing or uploading large / big SQL file (database) to your WAMP server using PhpMyAdmin. Actually, Default upload file size is 2MB

So, When your file is more than 2MB, you’ll get this Error. You can easily solve this issue by increasing the Upload file size.

  1. Find php.ini file

First find your main php.ini file.
1. Left click WAMP logo on task-bar, then click PHP -> php.ini
2. Goto C:\wamp\bin\apache\apache2.2.22\bin\php.ini

2.Edit php.ini file
In php.ini file, edit following thing for upto 2GB file size import or upload.
max_execution_time = 1800 // equals to 30 minutes
max_input_time = 1800 // equals to 30 minutes
memory_limit = 2001M // equals to 2 GB
upload_max_filesize = 2000M // equals to 2 GB
post_max_size = 2001M // equals to 2 GB
After edit save that file.

3.Change ExecTimeLimit

Go to following folder,
and open config.default.php. There find,
$cfg['ExecTimeLimit'] = 300;
//replace above code with following code
$cfg['ExecTimeLimit'] = 0; // here 0 for unlimited

After edit save that file.

4.Restart Wamp Server
After finish above 3 steps, restart your WAMP server. Now you can easily import / upload upto 2GB size Database.

IF above method don’t work You can upload your large .sql file via dumpfile easily.Follow these steps