mysql 报错 Caused by: com.mysql.jdbc.PacketTooBigException: Packet for query is too large
Caused by: com.mysql.jdbc.PacketTooBigException: Packet for query is too large
出现这个错误,其实就是你拼接的sql语句太长了,因为的mysql默认接收是不能大于1M的;
解决方案:
修复my.ini(windows)文件里面的配置项 max_allowed_packet,
命令设置:
mysql> set global max_allowed_packet = 100 * 1024 * 1024;