记录一个问题 Packet for query is too large
失败:org.springframework.dao.TransientDataAccessResourceException:
### Error updating database. Cause: com.mysql.jdbc.PacketTooBigException:
Packet for query is too large (58209206 > 33554432). You can change this value on the server by setting the max_allowed_packet' variable.
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: update t_receipt
SET receipt_no=?,
apply_id=?,
apply_no=?
.........
这个问题与数据库配置有关
解决方案:
show VARIABLES like '%max_allowed_packet%'; 可查看数据库配置 我的是33554432
最大可设置为1G 不过不建议,我暂时设置100M (set global max_allowed_packet = 1024*1024*100;)
设置之后重新启动mysql服务
然后问题就OK 了