简体   繁体   English

将sql.zip文件导入phpmyadmin时出现内存大小错误

[英]Memory size error when importing sql.zip file into phpmyadmin

I'm having issues importing a sql.zip file into phpmyadmin. 我在将sql.zip文件导入phpmyadmin时遇到问题。 When I try to import the file I get the following error: 当我尝试导入文件时,出现以下错误:
Fatal error : 致命错误

Allowed memory size of 134217728 bytes exhausted (tried to allocate 132382880 bytes) in /usr/share/phpmyadmin/export.php on line 310 在第310行的/usr/share/phpmyadmin/export.php中 ,已用完的内存大小为134217728字节(尝试分配132382880字节)

I've gone into the config file and the memory_limit is set to -1 (would it be better to set the limit?) and when I navigate into the export.php file I can't find a reason for the error. 我进入了配置文件,将memory_limit is set to -1 (设置限制会更好吗?),当我导航到export.php文件时,找不到错误的原因。 As far as I know the export.php file is still default, no one has edited the file. 据我所知export.php文件仍然是默认文件,没有人编辑过该文件。 Here's an image of the line (cursor marking line 310) 这是线的图像(光标标记线310)

I've been beating my head against this for ages, any help would be appreciated. 多年来我一直在反对这个问题,任何帮助将不胜感激。

Check this answer https://stackoverflow.com/a/4546797/5458355 . 检查此答案https://stackoverflow.com/a/4546797/5458355 With a terminal, having mysql in your global path, try: 在具有全局路径的mysql的终端上,尝试:

mysql -u <username> -p <databasename> < <filename.sql>

Is faster to import the db from terminal and you must do it if the file is too big... check also your Apache limits for file upload and memory limit. 从终端导入数据库的速度更快,如果文件太大,则必须这样做。还要检查Apache的文件上传限制和内存限制。

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

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