[笔记][网站] phpMyAdmin 提示数据库文件过大,无法导入的解决办法

实干、实践、积累、思考、创新。


phpMyAdmin导入数据库,默认只支持128M,数据库文件再大无法导入。

解决办法来自帮助文档:

(1)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_filesizememory_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. There exist several workarounds if your upload is too big or your hosting provider is unwilling to change the settings:

(PS. 更新了这几个参数依然无法解决。)

(2)Look at the $cfg['UploadDir'] feature. This allows one to upload a file to the server via scp, ftp, or your favorite file transfer method. PhpMyAdmin is then able to import the files from the temporary directory. More information is available in the Configuration of this document.

(最后通过这条解决。)

(3)Using a utility (such as BigDump) to split the files before uploading. We cannot support this or any third party applications, but are aware of users having success with it.

(4)If you have shell (command line) access, use MySQL to import the files directly. You can do this by issuing the “source” command from within MySQL:

source filename.sql;

  • 微信公众号 ( Wechat Subscription)

WeChat_QRCode

欢迎关注 “结构之旅” 微信公众号

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.