Home  >  Article  >  Database  >  Solution to the problem that phpMyAdmin cannot import large files

Solution to the problem that phpMyAdmin cannot import large files

angryTom
angryTomOriginal
2020-03-11 13:58:572074browse

Solution to the problem that phpMyAdmin cannot import large files

Solution to the problem that phpMyAdmin cannot import large files

phpMyAdmin’s default upload size only supports 2M. Importing large files will definitely fail. You can modify it manually The two parameters of php.ini

1. Upload_max_filesize is changed to 20m (that is, the maximum value of the file size allowed to be uploaded, the default is 2M, the modified value is customized)

2. Post_max_size is changed to 30m (referring to the maximum value that can be received through form POST to PHP, including all values ​​​​in the form, the default is 8M)

Continue to change the value of max_allowed_packet. The function of this value is to limit the mysql server to receive The size of the package, so if the imported file is too large, it may exceed the value set by this item and cause the import to fail.

Recommended: phpMyAdmin usage tutorial

cmd to connect to the database to modify the corresponding information:

Run separately:

show global variables like 'max_allowed_packet';  查看默认大小
set global max_allowed_packet=67108864;  设置大小

Solution to the problem that phpMyAdmin cannot import large files

Re-import to import large files.

For more phpMyAdmin tutorials, please pay attention to PHP Chinese website!

The above is the detailed content of Solution to the problem that phpMyAdmin cannot import large files. 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