You can change the max_allowed_packet global variable to increase (or decrease) max allowed packet size. For example, to change this to 32MB you would run the following:
sql> set global max_allowed_packet=33554432;
The max value for this is 64MB (67108864). This will affect client connections (like JDBC) as they use this value to determine items like the size of their receiving buffer.
Max_allowed_packet also has an effect on the replication slave. If the master sends an event larger than max_allowed_packet, the slave will stop with error:
Mysql client protocol error: Packet too big.
In such a case, the max_allowed_packet value should be increased (as large as 64MB) to avoid the issue.