Maximum execution time in phpMyadmin

2020-01-24 01:44发布

When I try to execute (some) queries in phpMyadmin I get this error

Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\phpmyadmin\libraries\dbi\mysql.dbi.lib.php on line 140

because I have a very large table (over 9 millions records)

I have edited the file C:\xampp\php\php.ini

and changed the value of "max execution time" from 60 to 1000 then restarts the PHP and still have the same error.

Any solution?

12条回答
唯我独甜
2楼-- · 2020-01-24 02:22

For Xampp version on Windows

Add this line to xampp\phpmyadmin\config.inc.php

$cfg['ExecTimeLimit'] = 6000;

And Change xampp\php\php.ini to

post_max_size = 750M 
upload_max_filesize = 750M   
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M

And change xampp\mysql\bin\my.ini

max_allowed_packet = 200M
查看更多
该账号已被封号
3楼-- · 2020-01-24 02:23

Go to xampp/php/php.ini

Find this line:

max_execution_time=30

And change its value to any number you want. Restart Apache.

查看更多
Explosion°爆炸
4楼-- · 2020-01-24 02:24

Well for Wamp User,

Go to: wamp\apps\phpmyadmin3.3.9\libraries

Under line 536, locate $cfg['ExecTimeLimit'] = 0;

and change the value from 0 to 6000. e.g

$cfg['ExecTimeLimit'] = 0;

To

$cfg['ExecTimeLimit'] = 6000;

Restart wamp server and phew.

It works like magic !

查看更多
何必那么认真
5楼-- · 2020-01-24 02:32

'ZERO' for unlimited time.

C:\Apache24\htdocs\phpmyadmin\libraries\Config.class.php

/**
 * maximum execution time in seconds (0 for no limit)
 *
 * @global integer $cfg['ExecTimeLimit']
 */
$cfg['ExecTimeLimit'] = 0;

You could also import the large file right from MySQL as query or a PHP query.

500,000 rows just took me 18 seconds to import on local server, using this method.

(create table first) - then:

LOAD DATA LOCAL INFILE 'Path_To_Your_File.csv' 
INTO TABLE Your_Table_Name 
FIELDS TERMINATED BY ',' 
LINES TERMINATED BY '\n' 
查看更多
虎瘦雄心在
6楼-- · 2020-01-24 02:34

What worked for me on WAMP was modifying file: \Wamp64\alias\phpmyadmin.conf, lines:

 php_admin_value max_execution_time 600
 php_admin_value max_input_time 600

I did not have to change the library file.

查看更多
Emotional °昔
7楼-- · 2020-01-24 02:37

In php.ini you must check mysql.connect_timeout either. That's responsible for socket closing and returning the Fatal. So, for example, change it to:

mysql.connect_timeout = 3600

That time will be always counted in seconds, so in my example you have 1 hour.

查看更多
登录 后发表回答