本文介绍了如何在 phpMyAdmin 中增加导入大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道您是否或如何增加phpMyAdmin 中的导入大小限制?目前我的服务器限制为 50MB.

Does anyone know if or how you can increase the import size limit in phpMyAdmin? Currently my server is limited to 50MB.

请注意,这与 php.ini 中的 upload_max_filesize 不同.该值设置为 2MB.

Please note that this is not the same as the upload_max_filesize in php.ini. That value is set to 2MB.

我需要将一个表导入到我的一个数据库中,而 phpMyAdmin 对导入的 50MB 限制阻止我这样做.

I need to import a table into one of my DBs and the phpMyAdmin restriction of 50MB on the import is preventing me from doing that.

谢谢.

修正——附上两张屏幕截图:

Amended -- attached are 2 screen shots:

屏幕截图 #1 -- 显示 php.ini 设置的 phpinfo().屏幕截图 #2 -- 显示 phpMyAdmin 导入限制

Screen Shot #1 -- phpinfo() showing the php.ini settings.Screen Shot #2 -- showing the phpMyAdmin import restriction

推荐答案

你也可以增加 post_max_size 看看有没有帮助?

Could you also increase post_max_size and see if it helps?

通过 HTML 表单上传文件会使上传的内容与任何其他表单元素内容一样被处理,这就是为什么也应该增加 post_max_size 的原因.

Uploading a file through an HTML form makes the upload treated like any other form element content, that's why increasing post_max_size should be required too.

更新:最终解决方案涉及命令行:

Update : the final solution involved the command-line:

要仅导出 1 个表,您可以这样做

To export only 1 table you would do

mysqldump -u user_name -p your_password your_database_name your_table_name > dump_file.sql

并导入:

mysql -u your_user -p your_database < dump_file.sql

'删除表 your_tabe_name;'如果还没有的话,也可以在导入脚本的顶部添加,以确保在脚本创建和填充之前删除该表

'drop table your_tabe_name;' can also be added at the top of the import script if it's not already there, to ensure the table gets deleted before the script creates and fill it

这篇关于如何在 phpMyAdmin 中增加导入大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 15:20