报错信息:
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. TCHAR和CHAR类型的互转,string 转lpcwstr

    https://www.cnblogs.com/yuguangyuan/p/5955959.html 没有定义UNICODE,所以它里面的字符串就是简单用" "就行了,创建工程的时 ...

  2. rabbitMQ使用一——helloworld

    参考链接 :https://blog.csdn.net/zhulongxi/article/details/72867545 https://www.cnblogs.com/ericli-ericli ...

  3. mybatis 直接执行sql 【我】

    Connection conn = getConnection();//            Connection conn = this.ss.getConnection(); 返回Connect ...

  4. 开源的电商 B2C、B2B2C 电商系统-关于shopnc版权问题处处是陷阱啊

    最近有好多人收到过shopnc的律师函,关于这可能大部分人都是在淘宝购买的,或者直接在33hao购买的.很多人可能没注意版权的问题,以为在33hao购买就没问题,但这只是陷阱,大家一定要注意 来源:h ...

  5. 递归思维判断数组a[N]是否为一个递增数组

    递归的方法:记录当前最大的,并且判断当前的是否比这个还大,大则继续,否则返回false结束: bool fun( int a[], int n ) { ) { return true; } ) { ] ...

  6. bank_card.js

    function init() { undefined = "undefined"; mkCClist(); } function ccchk(cdi) { output1 = & ...

  7. spring中IOC和AOP原理

    IoC(Inversion of Control): (1)IoC(Inversion of Control)是指容器控制程序对象之间的关系,而不是传统实现中,由程序代码直接操控.控制权由应用代码中转 ...

  8. SearchServer Elasticsearch Cluster / kibana

    S 使用nginx代理kibana并设置身份验证 https://blog.csdn.net/wyl9527/article/details/72598112 使用nginx代理kibana并设置身份 ...

  9. loadrunner / socket level data and wininet level data

    s loadrunner录制脚本时,此网站证书无效/无法录制到脚本问题解决 http://www.51testing.com/html/64/497364-3569552.html lr录制后空白_l ...

  10. springmvc上传图片《2》

    创建springboot项目 编写配置 server: port: 8082 spring: application: name: upload-service servlet: multipart: ...