The reason is that the Max_allowed_packet value is set too small.
There are two ways to say it online:
method One , directly modify MY.CNF (Linux) or My.ini (Windows) files, for example:
max_allowed_packet=10m
Then restart the MySQL service. But I can't do it after I try, and the reason is unclear.
method Two , through the MySQL own client (black box interface), through the command to see the current size of the Max_allowed_packet value:
like ' %max_allowed_packet% ';
The unit of the value to be detected is a byte (byte)
Set the default unit is also a byte, such as you want to set to 100M, then should be 100*1024*1024, the execution of the modified command is:
Set = - * 1024x768 * 1024x768
After the modification, you need to close the cmd window and reopen it again to see the new value after the change, otherwise you will see the original value (cache).
PS: The specific how much, need to depend on the specific circumstances, may be modified, or reported the same error, it doesn't matter, then set the larger. I have more than 4 G of SQL file, finally set Max_allowed_packet to 1G (i.e., 1024*1024*1024)
MySQL import times wrong: Got a packet bigger than ' Max_allowed_packet ' bytes