Maximum Execution Time Error When Importing .SQL data file in XAMPP

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

The Problem

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.

The Solution

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,

  1. max_execution_time=3000 (Set this as per your req)
  2. post_max_size=4096M
  3. upload_max_filesize=4096M

Once that’s done get back to a configuration variable within the phpMyAdmin directory that you can find in libraries\config.default.php called $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.

Enjoy… 🙂

Follow TechBiriyani on FacebookTwitter to get all the latest updates.

Leave a Comment