I am having a problem with BLOB fields in my MySQL database - when uploading files larger than approx 1MB I get an error Packets larger than max_allowed_packet are not
One of my junior developers was having a problem modifying this for me so I thought I would expand this in greater detail for linux users:
1) open terminal
2) ssh root@YOURIP
3) enter root password
4) nano /etc/mysql/my.cnf (if command is not recognized do this first or try vi then repeat: yum install nano )
5) add the line: max_allowed_packet=256M (obviously adjust size for whatever you need) under the [MYSQLD] section. He made a mistake of putting it at the bottom of the file first so it did not work.

6) Control + O (save) then ENTER (confirm) then Control + X (exit file)
7) service mysqld restart
8) You can check the change in the variables section on phpmyadmin