Mode one (verified correct):
Locate the My.ini configuration file in the MySQL installation directory and add the following code:
max_allowed_packet=500m
wait_timeout=288000
Interactive_timeout = 288000
Three parameter comments are as follows:
Max_allowed_packet is the maximum data packet that MySQL allows, which is the request you send;
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 the MySQL server has gone away #2006错误.
The function of the Max_allowed_packet parameter is to control the maximum length of its communication buffer
Mode II (online excerpt without verification):
Open Tools in the Navicat menu, select Server Monitor, then select the database in the left column , click the Variable form item in the right column, look for Max_allowed_packet, and change its value to large.
In the Chinese version: In the menu, tools--Server Monitor--check the left side of the database list---Find the Max_allowed_packet in the right variable, and change the value, such as 9999999999
Navicat import. sql file error 2006-mysql server has gone away