简体   繁体   English

无法通过PHP脚本执行mysqldump(大数据)

[英]Can't do a mysqldump from a PHP Script (Big data)

I'm trying to make a database dump from my php script, when I only try to dump the database structure it works just fine, but when I try to dump the data the application crashes, I tried using the options : --opt and --quick, but that didn't work for me. 我正在尝试从我的php脚本中进行数据库转储,当我仅尝试转储数据库结构时,它就可以正常工作,但是当我尝试转储数据时,应用程序崩溃了,我尝试使用以下选项:--opt和-快,但这对我没用。 Any ideas ? 有任何想法吗 ?

Run this before your script: 在脚本之前运行此命令:

ini_set('memory_limit', '-1');

You may also need this line to make sure PHP doesn't time out: 您可能还需要以下行以确保PHP不会超时:

set_time_limit(0);

You may need to increase the execution time of your application. 您可能需要增加应用程序的执行时间。 From the code: 从代码:

ini_set('max_execution_time', 3000);

Alternatively, you can edit the max_execution_time field in your php.ini file. 或者,您可以在php.ini文件中编辑max_execution_time字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM