冲破phpMyadmin上传文件2M大小限制

WBOY
Release: 2016-06-13 12:31:19
Original
978 people have browsed it

突破phpMyadmin上传文件2M大小限制

使用phpMyadmin导入数据库的时候,因为脚本在上传的时候响应时间过长,导致大于2M的数据偶尔会导入失败。而且大多数默认设置,只能导入2M的数据。

遇到这种情况

我们可以修改PHP.ini以及import.php对应的$memory_limit大小限制。还可以直接导入服务器上任意大小的SQL文件。

这里说一下第二个方法:

首先,打开phpMyAdmin根目录下的config.inc.php文件,然后找到

$cfg['UploadDir']
Copy after login

修改为

$cfg['UploadDir'] = ‘ck-import’
Copy after login

然后通过FTP将数据库上传到ck-import文件夹。

保存代码后,在phpMyadmin的后台操作页面会多出来一个(web server upload directory)。在下拉列表里面选择你需要导入的数据库,就可以导入大文件了:



?

同理在备份数据库的时候也可以直接保存在服务器上,修改 $cfg['SaveDir'] = ‘backup’ 参数即可。

?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!