问题描述
我有一个数据库未压缩的尺寸50mb
压缩的尺寸7mb
因此,当我尝试在几分钟后导入数据库压缩(7mb)时,会引发此错误:
I have a databaseUn-zipped size 50mb
zipped size 7mb
So when I try to import the database zipped(7mb) after few minutes it is throwing this error:
我已重新提交,但仍未导入总数据.
I have resubmitted it but still not importing total data.
我在本地工作,这是我的php.ini配置:
I am working in local and these are my php.ini configurations:
max_execution_time = 3000000
max_input_time = 60000000000000
memory_limit = 1280000000000000000000M
post_max_size = 4096456M
upload_max_filesize = 40964564M
max_file_uploads = 200
我如何让系统花费自己的时间进行导入??
how can I let the system to take its own time for import.?
推荐答案
如果要使用Phpmyadmin导入数据库,则有一个配置文件:
If you are importing your database using Phpmyadmin, then there's a configuration file for it:
\phpmyadmin\libraries\config.default.php
在任何编辑器中打开此配置文件,并将$cfg['ExecTimeLimit'] = 300;
更改为$cfg['ExecTimeLimit'] = 0;
Open this configuration file in any editor and change $cfg['ExecTimeLimit'] = 300;
to $cfg['ExecTimeLimit'] = 0;
重新启动您的本地主机,现在您没有任何时间限制.
Restart your localhost, now you don't have any time limit.
或者您可以使用MySQL命令行直接导入解压缩的SQL文件,如下所示:
Or you can use MySQL command line to import your unzipped SQL file directly, something like below:
mysql -u username -p database_name < my_unzipped_import_file.sql
这篇关于脚本超时已通过,如果您要完成导入,请重新提交相同的文件,导入将恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!