首页 > 运营 > 软件工具 > 正文

修改phpMyAdmin导入SQL文件的大小限制

2020-06-28 23:23:32
字体:
来源:转载
供稿:网友
这篇文章主要为大家详细介绍了修改phpMyAdmin导入SQL文件的大小限制,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,有需要的朋友可以收藏方便以后借鉴。

phpMyAdmin 是一个用PHP编写的,可以通过 web 方式控制和操作 MySQL 数据库。因为操作简单被广大的使用mysql的用户所喜欢,使用phpmyadmin的用户或许会遇到这样一种问题,当你准备导入mysql备份的时候发现无法导入,因为phpmyadmin导入的上限是2M,这下可为难了不少使用者,到底怎样做才能导入大文件的备份呢?

用phpMyAdmin导入mysql数据库时,我的19M的数据库不能导入,提示mysql数据库最大只能导入2M。

phpMyAdmin数据库导入出错:

You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.

可以修改导入数据库文件最大限制吗?

到网上搜索了一下前人的解决办法,大多数都说修改php.ini中的upload_max_filesize,但修改了这个以后,还是提示这个问 题;但phpMyAdmin在提示这个问题的时候,右下角有一行英文提示,大致意思是说,解决这个问题,可以参考phpMyAdmin文档;直接点击这个 链接,phpMyAdmin自动查找到了以下说明:

[1.16] I cannot upload big dump files (memory, http or timeout problems).

Starting with version 2.7.0, the import engine has been re–written and these problems should not occur. If possible, upgrade your phpMyAdmin to the latest version to take advantage of the new import features.

The first things to check (or ask your host provider to check) are the values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP. One user also said that post_max_size and memory_limit need to be larger than upload_max_filesize.

以上文件大致说明的意思就是说,遇到导入过大文件时,首先检查php.ini 配置文件中的以下三个地方,upload_max_filesize, memory_limit 和post_max_size,并且推荐修改的值要稍大于导入的巨大sql数据库文件;依照这个提示,我修改了以上三个在php.ini中的值以后,重启 了php环境,再次导入时,虽然phpMyAdmin还是显示导入最大限制:20,480 KB,但巨大的80M数据库文件已经被成功的导入了。

版本高点的phpMyAdmin则可以正确显示最大限制,一般就是显示post_max_size的值。

修改后

以上就是修改phpMyAdmin导入SQL文件的大小限制的全部内容,希望对大家的学习和解决疑问有所帮助,也希望大家多多支持错新网。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表