mysql 脚本超时 导入,脚本超时已通过,如果要完成导入,请重新提交相同的文件,导入将恢复...

I have a database

Un-zipped size 50mb zipped size 7mb

So when I try to import the database zipped(7mb) after few minutes it is throwing this error:

Script timeout passed, if you want to finish import, please resubmit

the same file and import will resume.

I have resubmitted it but still not importing total data.

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.?

解决方案

If you are importing your database using Phpmyadmin, then there's a configuration file for it:

\phpmyadmin\libraries\config.default.php

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.

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值