Import Big SQL File Into MySQL with phpMyAdmin

If you have problem to import large SQL files into MySql using phpMyadmin, the official documentation offers a few solutions, but the easiest method to solve this problem is:

  • Find the config.inc.php file located in the phpMyadmin directory. If you have Wamp installed, it is probably located here:
C:\wamp\apps\phpmyadmin3.4.10.1\config.inc.php
  • Find the line with $cfg[‘UploadDir’] on it and update it to:
$cfg['UploadDir'] = 'upload';
  • Create a folder called ‘upload’ in the same folder where config.inc.php file, so now you have:
C:\wamp\apps\phpmyadmin3.4.10.1\upload\

Then copy the big sql file that you are trying to import into the new upload folder.

Now when you go to phpMyAdmin, at the import page you choose a drop down present that wasn’t there before – it contains all of the sql files in the upload directory that you have just created. You can now select your file, and start with the import.

Simple as that.

 

Picture source.


If you liked the post, we should get connected - follow me on Twitter