How to solve time out in phpmyadmin?

2019-01-07 07:06发布

I want import huge (at least 300 mb) sql scripts via phpMyAdmin.

I've tried:

post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 300
max_input_time = 540
memory_limit = 1000M

in my php.ini file, but I'm still getting timeout errors during importing.

10条回答
SAY GOODBYE
2楼-- · 2019-01-07 07:35

I had this issue too and tried different memory expansion techniques I found on the web but had more troubles with it. I resolved to using the MySQL console source command, and of course you don't have to worry about phpMyAdmin or PHP maximum execution time and limits.

Syntax: source c:\path\to\dump_file.sql

Note: It's better to specify an absolute path to the dump file since the mysql working directory might not be known.

查看更多
孤傲高冷的网名
3楼-- · 2019-01-07 07:38

I was having the issue previously in XAMPP localhost with phpmyadmin version 4.2.11.

Increasing the timeout in php.ini didn't helped either.

Then I edited xampp\phpMyAdmin\libraries\config.default.php to change the value of $cfg['ExecTimeLimit'], which was 300 by default.

That solved my issue.

查看更多
干净又极端
4楼-- · 2019-01-07 07:39

If using Cpanel/WHM the location of file config.default.php is under

/usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries

and you should change the $cfg['ExecTimeLimit'] = 300; to $cfg['ExecTimeLimit'] = 0;

查看更多
Viruses.
5楼-- · 2019-01-07 07:41

If even after repeated upload you still get timeout error, pleasechange your settings in

\phpmyadmin\libraries\config.default.php

from $cfg['ExecTimeLimit'] = 300; to $cfg['ExecTimeLimit'] = 0; and restart. Now there is no execution time limit (trust we are talking about local server).

Source : Change Script time out in phpmyadmin

查看更多
The star\"
6楼-- · 2019-01-07 07:43

I had the same issue and I used command line in order to import the SQL file. This method has 3 advantages:

  1. It is a very easy way by running only 1 command line
  2. It runs way faster
  3. It does not have limitation

If you want to do this just follow this 3 steps:

  1. Navigate to this path (i use wamp):

    C:\wamp\bin\mysql\mysql5.6.17\bin>

  2. Copy your sql file inside this path (ex file.sql)

  3. Run this command:

    mysql -u username -p database_name < file.sql

Note: if you already have your msql enviroment variable path set, you don't need to move your file.sql in the bin directory and you should only navigate to the path of the file.

查看更多
\"骚年 ilove
7楼-- · 2019-01-07 07:46

GoDaddy shared hosting

This is not an answer, but a redirect to an answer. It could have been entered below the question as a comment, but would have appeared below numerous other comments and would not be visible. Please do not upvote this answer.

If you are getting the dreaded MySQL server has gone away or you believe your import is timing out, see this answer:

https://stackoverflow.com/a/48634827/1447509

查看更多
登录 后发表回答