报错信息:
Error updating database. Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (5872 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.
 
解决办法:

进入MYSQL

输入show variables like '%max_allowed_packet%';

2.修改配置,我这里设置的是20M

在MYSQL里输入set global max_allowed_packet = 2*1024*1024*10;(20M)

原文地址:

https://blog.csdn.net/qq_33864656/article/details/75006841

 

注意:Tomcat要重启,mysql不用重启

show variables like '%max_allowed_packet%';
set global max_allowed_packet = 1048576;
修改之后要关闭连接,重新连接mysql,要不然看不到效果

mysql报错:Cause: com.mysql.jdbc.PacketTooBigException的更多相关文章

  1. 启动Mysql报错:Another MySQL daemon already running with the same unix socket.

    启动Mysql报错: Another MySQL daemon already running with the same unix socket. 删除如下文件即可解决 /var/lib/mysql ...

  2. springboot连接mysql报错:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

    nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. ...

  3. Linux 登录 MySQL 报错, 解决bash: mysql: command not found 的方法

    原因:这是由于系统默认会查找/usr/bin下的命令,如果这个命令不在这个目录下,当然会找不到命令,我们需要做的就是映射一个链接到/usr/bin目录下,相当于建立一个链接文件. 首先得知道mysql ...

  4. Linux环境下mysql报错:bash: mysql: command not found 的解决方法

    # mysql -u root-bash: mysql: command not found 原因:这是由于系统默认会查找/usr/bin下的命令. 如果这个命令不在这个目录下,当然会找不到命令. 我 ...

  5. ImportError: No module named mysql 报错python引用mysql报错

    需要安装 pip2.7 install MySQL-python pip2.7 install mysql-connector

  6. MySQL报错解决:The MySQL server is running with the --read-only option so it cannot execute this statement

    MySQL报错:The MySQL server is running with the --skip-grant-tables option so it cannot execute this st ...

  7. java项目连接jdbc报错:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server

    java项目连接jdbc报错:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not creat ...

  8. Java连接数据库报错:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

    解决方案 连接Mysql报错 The last packet sent successfully to the server was 0 milliseconds ago. The driver ha ...

  9. 使用Mybatis连接到Mysql报错,WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be esta

    在Eclipse中使用springboot整合Mybatis,连接到5.7版本Mysql报错WARN: Establishing SSL connection without server's ide ...

  10. mysql报错this is incompatible with sql_mode=only_full_group_by

    1.报错信息 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP ...

随机推荐

  1. 【洛谷P3917】异或序列

    题目大意:给定一个长度为 N 的序列,每个位置有一个权值,求 \[\sum\limits_{1\le i\le j\le n}(a_i\oplus a_{i+1}...\oplus a_j)\] 的值 ...

  2. socketv 验证客户端链接的合法性,socketserver

    补充: send()与sendall() 在python socket编程中,有两个发送TCP的函数,send()与sendall(),区别如下: socket.send(string[, flags ...

  3. Day8--Python--文件操作

    对文件内部的内容进行操作1.open('文件路径', mode='模式(默认是读r)', encoding='编码') 读取内容: f = open('d:/练习.txt', mode='r', en ...

  4. unittest的使用二——生成基于html的测试报告

    mac下的安装: 1.下载HTMLTestRunner.py文件,下载地址http://tungwaiyip.info/software/HTMLTestRunner.html,可以复制里面的内容到一 ...

  5. 踩过的坑—iphone手机H5样式兼容总结

    对一个前端开发者来说,最煎熬的莫过于"兼容"两个字了(说到这个词朋友们是不是身体一抖),哪怕对于工作多年的老油条来讲,也不是完全了解各种场景下的兼容性处理方法.在这里我就把我在工作 ...

  6. jRebel与xRebel的使用

    jRebel: https://blog.csdn.net/liuzhigang828/article/details/72875190 xRebel: https://blog.csdn.net/a ...

  7. Spring Cloud Netflix Eureka: 多网卡环境下Eureka服务注册IP选择问题

    https://blog.csdn.net/neosmith/article/details/53126924 通过源码可以看出,该工具类会获取所有网卡,依次进行遍历,取ip地址合理.索引值最小且不在 ...

  8. apache thrift分析

    thrift是一个用来实现跨语言的远程调用(RPC Remote Procedure Call)的软件框架.根据接口定义语言(IDL Interface definition lanuage) 并借助 ...

  9. mysqldump常用备份参数

    #!/bin/sh DUMP=/usr/bin/mysqldump OUT_DIR=/var/ftp/iips/mysqlbak LINUX_USER=root DB_NAME=yfdmbd DB_U ...

  10. JAVA8 in Action:行为参数化,匿名类及lambda表达式的初步认知实例整理

    import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.functio ...