Focus on cloud service provider activities
Notes on website operation and maintenance

Resolve the problem of "MySQL server has gone away" when importing the database

Today, when helping a netizen to relocate the server, the error "ERROR 2006 (HY000) at line 2214: MySQL server has gone away" was prompted when the database was always imported to the backup database using MySQL. Previously, it was no problem to import using this method. From the error prompt, it is estimated that the set parameters are too small and the database is relatively large. The database has about 2GB, which should exceed the resource limit.

 Resolve the import database appears

To solve this problem, we need to modify the default my.cnf configuration file. Default“ max_allowed_packet "The parameter value is 1M, here I will change it to 32M directly, and try a bigger one.

 Resolve the import database appears

This netizen uses the WDCP system. Here you can directly find the corresponding my.cnf file and modify it. There are two files in total.

Finally, after the modifications are saved, restart the WEB and then import MySQL into the database, no error will be reported.

Vote for you
Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Resolve the problem of "MySQL server has gone away" when importing the database