Cause: com.mysql.jdbc.PacketTooBigException
来源:互联网 发布:gson将对象转换成json 编辑:程序博客网 时间:2024/05/21 19:35
今天在做批量上传的时候爆了一个错误,之前都没有遇到过;
Error updating database. Cause: com.mysql.jdbc.PacketTooBigException:
Packet for query is too large (9270713 > 4194304).
You can change this value on the server by setting the max_allowed_packet' variable.
Packet for query is too large (9270713 > 4194304).
You can change this value on the server by setting the max_allowed_packet' variable.
查看资料后发现
MYSQL会根据配置文件会限制server接受的数据包大小。
有时候在大的插入和更新会被max_allowed_packet 参数限制掉,导致失败。
接下来讲一下如何查看以及如何更改
1.查看配置
进入MYSQL
输入show variables like '%max_allowed_packet%';
可以看到只有4M
2.修改配置,我这里设置的是20M
在MYSQL里输入set global max_allowed_packet = 2*1024*1024*10;(20M)
退出MSQL SERVER
再次连入后查看
输入show variables like '%max_allowed_packet%';
max_allowed_packet 参数变成了20M
阅读全文
0 0
- Cause: com.mysql.jdbc.PacketTooBigException
- com.mysql.jdbc.PacketTooBigException:
- com.mysql.jdbc.PacketTooBigException
- com.mysql.jdbc.PacketTooBigException: 解决方案
- com.mysql.jdbc.PacketTooBigException: 解决方案
- com.mysql.jdbc.PacketTooBigException 问题解决
- com.mysql.jdbc.PacketTooBigException: 解决方案
- Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (144900 > 1024)
- Mysql com.mysql.jdbc.PacketTooBigException 的解决方案
- MYSQL com.mysql.jdbc.PacketTooBigException错误
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large
- 解决com.mysql.jdbc.PacketTooBigException: Packet for query is too large (3158064)问题
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large > 1024
- nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1109 > 1024
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (2017898 > 1048576)
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (4200044 > 1048576). You can cha
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (11707239 > 1048576). You can c
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1157 > 1024).
- TCP网络拥堵算法
- 【更新】浏览器控件JxBrowser V6.14.2发布 | 修复多个重大bug
- Error: no such instruction: `ldr sp,=4096'
- 2015年上半年工作总结
- 重温FTP的主动模式和被动模式
- Cause: com.mysql.jdbc.PacketTooBigException
- java 切面执行两次
- 多线程调试
- 激光雷达点云投影
- 分布式缓存Redis Centos下单节点安装
- Android数据库升级且表添加新列
- RCNN学习笔记(2):Rich feature hierarchies for accurate object detection and semantic segmentation
- Angular-cli安装
- 9.Scala的内部类实战详解