max_allowed_packet太小

阅读量: 218 编辑

max_allowed_packet太小

Cause: com.mysql.cj.jdbc.exceptions.PacketTooBigException: Packet for query is too large (2,671,831 > 1,048,576). You can change this value on the server by setting the max_allowed_packet variable. ; Packet for query is too large (2,671,831 > 1,048,576). You can change this value on the server by setting the 'max_allowed_packet' variable.

执行

//打开数据库,执行下方sql。设置为20M即可

set global max_allowed_packet = 20*1024*1024;