[mysql] ERROR 2006 (HY000): MySQL server has gone away

You can also log into the database as root (or SUPER privilege) and do

set global max_allowed_packet=64*1024*1024;

doesn't require a MySQL restart as well. Note that you should fix your my.cnf file as outlined in other solutions:

[mysqld]
max_allowed_packet=64M

And confirm the change after you've restarted MySQL:

show variables like 'max_allowed_packet';

You can use the command-line as well, but that may require updating the start/stop scripts which may not survive system updates and patches.

As requested, I'm adding my own answer here. Glad to see it works!