这个错误是由于mysql的一个系统参数max_allowed_packet设置的值过小引起的

解决这个错误的方法就是修改这个参数的值,

linux系统中我们在etc目录下找到my.cnf这个文件,打开这个文件后把max_allowed_packet = 1M 中的参数值1M改为4M,如果没有这个参数那么直接添加这行max_allowed_packet = 4M 就搞定了

添加完重启mysql数据库,重启命令是service mysqld restart

com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1680 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.的更多相关文章

  1. Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (16944839 > 16777216). You can change this value on the server by setting the max_allowed_packet' variable.

    今天发现task微服务的error日志报如下错误: Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large ...

  2. Linux服务器上日志报com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1783 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.

    在做查询数据库操作时,报了以上错误,还有out of memery heap hacp ,原因是MySQL的max_allowed_packet设置过小引起的,我一开始设置的是1M,后来改为了20M ...

  3. 问题: Packet for query is too large (1786 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.

    错误描述: 今天在手机端查看之前上线的项目时,突然报了下面的错误.再之后用电脑登陆,其他设备登陆都一直报这个错误. 错误信息: ### Error querying database. Cause: ...

  4. mysql Packet for query is too large (2036 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.

    解决方法: 打开控制台,输入下面语句,执行 set global max_allowed_packet = 20*1024*1024; 网上说要重启 mysql server, 我是执行完后不用重启就 ...

  5. Packet for query is too large (1660 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.

    原因是mysql 默认允许的 数据报包 是 1M  设置大一些就可以了 centos 下面  /ect/my.cnf 文件里面 加入或者修改 下面的参数 [mysqld] max_allowed_pa ...

  6. MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.

    MYSQL Packet for query is too large (12054240 > 4194304). You can change this value on the server ...

  7. 服务器的日志一直报Packet for query is too large (7632997 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.的解决方法

    服务器的日志一直报Packet for query is too large (7632997 > 4194304). You can change this value on the serv ...

  8. nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1044 > 1024

    HTTP Status 500 - type Exception report message description The server encountered an internal error ...

  9. com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1169 > 1024)

    ### Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1169 > 1024). You ...

随机推荐

  1. nodeJs学习-05 案例:http/fs/querystring/url

    const http = require('http'); const fs = require('fs'); const querystring = require('querystring'); ...

  2. 【Objective-C】-空指针和野指针

    一.什么是空指针和野指针 1.空指针 1> 没有存储任何内存地址的指针就称为空指针(NULL指针) 2> 空指针就是被赋值为0的指针,在没有被具体初始化之前,其值为0. 下面两个都是空指针 ...

  3. P2P需集齐四大证照

    今后做P2P需集齐四大证照 比牌照制还严 2016-09-05 11:53:24 分类:热点观察 作者:汪祖刚 8月24日,P2P网贷监管细则在千呼万唤中始出来,整个行业内外的关注热度可谓史无前例.有 ...

  4. LeetCode74 Search a 2D Matrix

    Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the follo ...

  5. JQuery------库

    JQuery-------------模块.类库 集成了DOM/BOM/JS的类库 一.查找元素 DOM 10左右 JQuery: 选择器: 筛选: ps:版本: 1.x:兼容性最好.1.12推荐 2 ...

  6. LRJ-Example-06-02-Uva514

    #define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<stack> using namespace std; + ...

  7. 在SQL中number(16,5)中的16和5 及number( 5,-2)中的5和-2是什么意思?

    在SQL中number(16,5)中的16和5 及number( 5,-2)中的5和-2是什么意思? 2018-06-04 19:23:24 xiaonan_IT 阅读数 3672   版权声明:本文 ...

  8. wpf 登录时显示状态动态图

    下面的示例演示了如何在登录过程时,界面上显示状态图标,登录完成后隐藏图标: public partial class MainWindow : Window { public MainWindow() ...

  9. 2019-1-29-win10-uwp-使用-Microsoft.Graph-发送邮件

    title author date CreateTime categories win10 uwp 使用 Microsoft.Graph 发送邮件 lindexi 2019-01-29 16:36:3 ...

  10. set_time_limit(0)是什么意思?

    语法 : void set_time_limit (int seconds) 说明 : 设定一个程式所允许执行的秒数,如果到达限制的时间,程式将会传回错误.它预设的限制时间是30秒,max_execu ...