In this Article we have show How to fix “Script timeout passed, if you want to finish import, please resubmit the same file and import will resume” error. We are going to import database file that will be “200mb ” file size and In this article we are using xampp localhost server and importing the database file into phpmyadmin.
Why its getting?
Whenever we have importing a large database file in phpmyadmin and its getting error the logic is behind this database having some time out limits for execution (maximum execution) the script, but in large database, it exceeds the execution time out limit, and it getting “Script timeout passed, if you want to finish import, please resubmit the same file and import will resume” error. On xampp server default execution time limit is 300s for each script but for large database file it takes too much time compared to default execution time.
As you know if we are importing a large database file size through phpmyadmin then firstly you will make sure to update these limits. For increasing the limits Go to “C:\xampp\php\php.ini” and set the limits according to your need then saved it.
max_execution_time = 3000
max_input_time = 60000
memory_limit = 12800M
post_max_size = 4094M
upload_max_filesize = 4094M
max_file_uploads = 200
Now its time to increase the timeout limit 300s to infinity.
After updating the changes Go to C:\xampp\phpmyadmin\libraries\config.default.php and open into code editor And find “$cfg[‘ExecTimeLimit’] = 300;” it and make it value “$cfg[‘ExecTimeLimit’] = 0;” & save it.
$cfg['ExecTimeLimit'] = 300; update the value into 0
$cfg['ExecTimeLimit'] = 0;
After making the changes, reboot the localhost server and re-import the database file. This time it has been imported successfully.
Importing through MySql command line
You can also use the mysql command line to import the large database file, before opening the command line you have to make changes in the configuration file that we did before in phpmyadmin.
Step 1:- Open the shell command.
Step 2:- just follow the given command and enter the user password
mysql -u username -p database_name < databse_file.sql
Sometimes it’s getting an error just ignoring it. After taking some time, it’s imported successfully.