Home  >  Article  >  Database  >  How to import 20m database in phpmyadmin

How to import 20m database in phpmyadmin

尚
Original
2020-03-11 16:18:191906browse

How to import 20m database in phpmyadmin

phpmyadmin default import database file size is 2M, but the files exported by the database of general websites will exceed this limit. To import database files exceeding 2M, you need to manually modify the php.ini configuration file !

Recommended: phpmyadmin introductory tutorial

Modify in the php.ini file:

upload_max_filesize 20m (that is, the maximum size of the uploaded file allowed, the default is 2M, the modified value size is customized)

After modification, refresh the phpmyadin import database page and you will find that the import database size limit will be displayed as "(maximum limit: 8,192 KB)" instead of the manually set 20m .

Yes, if you only change the upload_max_filesize setting, the php.ini configuration will use the post_max_size configuration by default as the standard for the size limit of the database file imported by phpmyamdin.

So we still need to make the following modifications:
post_max_size 30m (referring to the maximum value that can be received through POST to PHP through the form, including all values ​​​​in the form, the default is 8M)

Refresh the phpmyadin import database page again and you will find that the maximum limit value will become 20m, even if the upload_max_filesize configuration option is used. After modifying the above two values ​​many times, we came to the conclusion:

php.ini will take the smaller value of the two configurations upload_max_filesize and post_max_size as the effective value for the import database file size limit! !

Note: For the above settings to take effect, you must confirm:

file_uploads     on

Related recommendations: PHP video tutorial

The above is the detailed content of How to import 20m database in phpmyadmin. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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