Import Large Database phpmyadmin - XAMPP & WAMP

While you're trying to import large file using phpmyadmin to MySQL having size more then 20M. MySQL will rejected the file and through an error. Tutorial will describe you to upload large files in php and increase post max time of php as well as increase execution time in php. Learn how to upload large files using phpmyadmin.
You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit. following error can destroy your whole day simple steps for XAMPP and WAMP.

Enable Large File Upload in MySQL:

MySQL has the compatibility to accept large files through phpmyadmin.You need to enable some options to upload large files.


  • Switch to your XAMPP directory and go to folder PHP C:\xampp\php
  • Open php.ini file in any of the text editor, preferably use Notepad for Windows.
  • Press Ctrl+F and search for upload_max_filesize=20M to  upload_max_filesize = 128M.
  • Search for post_max_size and change it to  post_max_size = 128M.
  • Search max_execution_time replace the 30 to 300. just like that max_execution_time = 300.
  • The last thing you need to do is change max_input_time set it to  max_input_time = 60.
  • Stop and start your Apache from XAMPP Control Panel and you're done.

Video Upload Max Upload Size XAMPP:


  • Go to C:\wamp\bin\apache\Apache2.4.4\bin and change the following lines.
  • Change max_execution_time  to max_execution_time = 3000.
  • If available max_input_time Change  to max_input_time = 60.
  • Find Memory limit change that to memory_limit = 128M.
  • Search for upload max file size change them to upload_max_filesize = 128M.
  • In last change post_max_size = 750M. Restart your Wamp Server.

Upload Large files from WAMP Console:
  1. Click on WampServer Tray Icon -> Go to MySQL ->  MySQL Console.
  2. Enter password like "root" for your databse in popup.
  3. Select database name for insert data by writing command USE DATABASENAME.
  4. Then load source sql file as SOURCE C:\FOLDER\database.sql.
  5. Press enter for insert data.

Post a Comment