gpt4 book ai didi

mysql - 无法将 365 kb sql 文件导入 WampServer 上的 phpmyadmin

转载 作者:行者123 更新时间:2023-11-29 00:17:29 24 4
gpt4 key购买 nike

在安装在 Windows 8 上的 WampServer 上尝试将小型 sql 文件导入到 phpmyadmin 时,它一直在加载。我收到以下错误

Fatal error: Maximum execution time of 300 seconds exceeded in D:\wamp\apps\phpmyadmin4.0.4\libraries\dbi\mysqli.dbi.lib.php on line 267

我在下面包含了错误日志。

[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP Fatal error:  Maximum execution time of 300 seconds exceeded in D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\dbi\\mysqli.dbi.lib.php on line 267, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP Stack trace:, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 1. {main}() D:\\wamp\\apps\\phpmyadmin4.0.4\\import.php:0, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 2. ImportSql->doImport() D:\\wamp\\apps\\phpmyadmin4.0.4\\import.php:489, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 3. PMA_importRunQuery() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\plugins\\import\\ImportSql.class.php:414, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.009137 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 4. PMA_DBI_try_query() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\import.lib.php:158, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:03:20.010143 2014] [:error] [pid 5160:tid 1672] [client ::1:55653] PHP 5. PMA_DBI_real_query() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\database_interface.lib.php:192, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP Fatal error: Maximum execution time of 300 seconds exceeded in D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\dbi\\mysqli.dbi.lib.php on line 267, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP Stack trace:, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 1. {main}() D:\\wamp\\apps\\phpmyadmin4.0.4\\import.php:0, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 2. ImportSql->doImport() D:\\wamp\\apps\\phpmyadmin4.0.4\\import.php:489, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 3. PMA_importRunQuery() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\plugins\\import\\ImportSql.class.php:414, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 4. PMA_DBI_try_query() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\import.lib.php:158, referer: http://localhost/phpmyadmin/import.php
[Mon Mar 17 19:09:23.798129 2014] [:error] [pid 5160:tid 1672] [client ::1:55969] PHP 5. PMA_DBI_real_query() D:\\wamp\\apps\\phpmyadmin4.0.4\\libraries\\database_interface.lib.php:192, referer: http://localhost/phpmyadmin/import.php

最佳答案

当然,原因是 phpMyAdmin 是一个 php 应用程序,因此受到 php.ini 中的 max_execution_time 的限制

解决方案 1 是像这样更改 php.ini 文件并增加执行时间

max_execution_time = 2000

解决方案 2 就是像这样增加 phpMyAdmin 应用程序的时间

编辑\wamp\alias\phpmyadmin.conf 并将这些行添加到该文件中 Alias/phpmyadmin .....

php_admin_value max_execution_time 2000
php_admin_value max_input_time 2000

解决方案 3. 在我看来,恢复大型数据库转储的最佳解决方案是使用 MySQL 控制台,因为它没有任何限制,只会运行到您的备份文件已完全处理。

左键单击 wampmanager 图标 -> MySQL -> MySQL 控制台输入您的“root”密码,如果您没有“root”用户标识的密码,则直接按回车键。

然后在mysql>提示符下输入这个命令

source path/to/the/backup/file.sql

如果您选择选项 1 或 2,请不要忘记将 max_execution_time 设置回不超过 60 秒。如果您犯了在 PHP 代码中编写无限循环的错误(而且我们都不是完美的),则 PHP 代码将在给出错误之前运行 max_execution_time。如果它运行了 2000/60 = 33.5 分钟才给您提供错误线索,这可能会让人非常困惑。

关于mysql - 无法将 365 kb sql 文件导入 WampServer 上的 phpmyadmin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22456064/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com