SQL database structure + data, if the data is bulk INSERT will be error: 2006-mysql server has gone away.
Workaround: Locate the My.ini configuration file in your MySQL directory and add the following code
max_allowed_packet=500m
wait_timeout=288000
Interactive_timeout = 288000
You can change the value of your own, and finally remember to restart your MySQL service.
This will be a good solution to the MySQL server has gone away problem. Max_allowed_packet is MySQL allows the largest packet, that is, you send the request, Wait_timeout is the longest time to wait, this value can be customized, but if the time is too short, after the timeout will be now MySQL server has gone Away #2006错误. The Max_allowed_packet parameter is used to control the maximum length of its communication buffer.
MySQL Import data is error: 2006-mysql server has gone away