In this article, we sharing the best solution for maximum execution time error when using PhpMyAdmin to upload large MySQL data files through XAMPP.
Also read: Install Bootstrap 4 using Node JS and Gulp
I was trying to upload one of my website’s MySQL data file through PhpMyAdmin and was stuck with this error. Anyway, i found the solution and i wanted to share to my friends and it ended up in writing this post. By the way, i got the exact error mentioned below.
Maximum execution time of 600 seconds exceeded in C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php
I am trying to import a large .sql data file using phpMyAdmin in XAMPP. However, this is taking a lot of time and I keep getting
max_execution time error each time.
Now about the error here, first on the safe side make sure you have set PHP parameters properly so that you can upload large files and can use maximum execution time from that end. If not, go ahead and set below three parameters from php.ini file,
- max_execution_time=3000 (Set this as per your req)
Once that’s done get back to a configuration variable within the phpMyAdmin directory that you can find in
$cfg['ExecTimeLimit'] that you can set to whatever maximum execution time you need. On XAMPP you will find it under “
C:\xampp\phpMyAdmin\libraries” folder. Open the file called
config.default.php and set :
$cfg['ExecTimeLimit'] = 0;
Well, to get rid of this you need to set phpMyadmin variable to either 0 that is unlimited or whichever value in seconds you find suitable for your needs. Or you could always use CLI(command line interface) to not even get such errors(For which you would like to take a look at this link.
Once set, restart your MySQL and Apache and go import your database.