The max_allowed_packet variable can be set globally by running a query.
However, if you do not change it in the my.ini file (as dragon112 suggested), the value will reset when the server restarts, even if you set it globally.
To change the max allowed packet for everyone to 1GB until the server restarts:
SET GLOBAL max_allowed_packet=1073741824;