MySQL modify the maximum limit for importing database files

It is necessary to backup and restore the MySQL database of a system in the company, but since the sql file is nearly 200M, the Mysql web management interface only allows the import of sql files not larger than 2M. The solution process is as follows:
1. Since mysql can parse the compressed sql file, So 200M is compressed to 5M. Naming format eg: compressed file name must end with .[format].[compression method]. Such as: .sql.zip
2. By default: MySQL import file size is limited, the maximum is 2M, so when the file is very large, it cannot be imported directly, you can modify the PHP.ini parameter adjustment:
modify the relevant parameters in php.ini Parameters:
There are three parameters that affect the size of the MySQL import file:
memory_limit=128M, upload_max_filesize=2M, post_max_size=8M Just
modify two of them, and modify them to:
upload_max_filesize=200M, post_max_size=200M

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326430261&siteId=291194637