MAX ALLOWED PACKET DOCUMENTATION
This value indicates maximum size of one packet, The packet message buffer is initialized to net_buffer_length bytes, but can grow up to max_allowed_packet bytes when needed. This value by default is small, to catch large (possibly incorrect) packets.
You must increase this value if you are using large BLOB columns or long strings. It should be as big as the largest BLOB you want to use.
This server variable can be set globally by running a query.
However, if you do not change it in the my.ini/my.cnf
file, the value will reset when the server restarts, even if you set it globally.
To change the setting for everyone until the server restarts:
SET GLOBAL max_allowed_packet=1073741824;