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.
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.
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.