Site icon SmartTutorials.net

Import large files mysql phpmyadmin localhost

I had this problem when i’m try to upload 8MB file into the localhost, I had the following

You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.

When trying to import large SQL files into mysql using phpmyadmin, the phpmyadmin documentation offers a few solutions, but I find the easiest method to overcome this is…
Find the config.inc.php file located in the phpmyadmin directory. In my case it is located here:

1. C:\xampp\phpMyAdmin\config.inc.php

Find the line with $cfg[‘UploadDir’] in the config.inc.php and update the line this

2. $cfg['UploadDir'] = 'upload';

If you don’t find just open a config.sample.inc.php and copy that line and paste into your actual config.inc.php file and update as i mentioned above. Finally it will be:

3.  $cfg['UploadDir'] = "upload"

Save the file and create upload folder under phpmyadmin folder.

 4. C:\xampp\phpMyAdmin\upload

Then copy your all .sql files into the upload folder in the phpmyadmin like this

Now when you go to phpmyadmin import page you will see  a drop down with list of .sql files below the browse button.

If you finished above steps successfully now you can upload all .sql files in the localhost.

Sometimes if you have problem like this follow the below steps :

If you get Script timeout passed, if you want to finish import, please resubmit same file and import will resume.

add $cfg['ExecTimeLimit'] = 0; this line in config.inc.php file.
 By default setting for ExecTimeLimit is 300 seconds.

 .

Exit mobile version