MySQL查询报错:
### Error querying database. Cause: com.mysql.cj.jdbc.exceptions.PacketTooBigException: Packet for query is too large (2,482 > 2,048). You can change this value on the server by setting the 'max_allowed_packet' variable. ### The error may exist in class path resource [mapper/system/SysBizProcessResultLogMapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: select count(*) from sys_biz_process_result_log WHERE dept_id in ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) and biz_type in ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ) and start_time >= ? and over_time <= ? ### Cause: com.mysql.cj.jdbc.exceptions.PacketTooBigException: Packet for query is too large (2,482 > 2,048). You can change this value on the server by setting the 'max_allowed_packet' variable. ; Packet for query is too large (2,482 > 2,048). You can change this value on the server by setting the 'max_allowed_packet' variable.; nested exception is com.mysql.cj.jdbc.exceptions.PacketTooBigException: Packet for query is too large (2,482 > 2,048). You can change this value on the server by setting the 'max_allowed_packet' variable.
解决方法:设置max_allowed_packet
set global max_allowed_packet = 67108864;
除此之外,比如在Windows下,my.ini
文件配置了max_allowed_packet=100M
,那么你可能需要将此值进行修改。
参考:
最新评论
网飞没问题, 迪士尼+有解决方案么?
pp助手是安卓手机用的,根本下载用不来苹果
已解决
这样的话数据库里的结构为{"attachment":{"content":"xxx"}}, 要怎么才能变成{"content":"xxx"},从而使结构保持一致?
赞! make test不过的坑都写到的,谢谢楼主~
谢谢你
用了root用户还是一直502是怎么回事呢
student id 是空的