`

Packet for query is too large

 
阅读更多
com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1521830 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.


解决方案:
MySQL的一个系统参数:max_allowed_packet,其默认值为1048576(1M)
查询:show VARIABLES like '%max_allowed_packet%';

修改此变量的值:

MySQL安装目录下的

my.ini文件中的[mysqld]段中的"max_allowed_packet = 1M",(可能有些文件会没有这一行的)

格式为:

[mysqld]

max_allowed_packet = 1M ( 将1M更改为4M(如果没有这行内容,增加一行)),

保存,

重起MySQL服务。

现在可以load大于1M的文件了
分享到:
评论

相关推荐

    com.mysql.jdbc.PacketTooBigException: Packet for query is too large (11087 > 102

    在描述中提到的错误信息 "Packet for query is too large (11087 > 102)" 指明了问题的具体情况,即数据包的大小(11087字节)超出了MySQL默认允许的最大值102字节。 这个问题通常发生在以下几种情况: 1. **大数据...

    MySQL Packet for query is too large 问题及解决方法

    MySQL中的“Packet for query is too large”错误通常发生在尝试发送超过服务器允许的最大数据包大小的查询时。这个错误是由于`max_allowed_packet`系统变量的限制,它定义了MySQL服务器可以接收的最大数据量。默认...

    Mysql报错Packet for query is too large问题解决

    今天在往mysql中插入数据时遇到的问题,翻译过来的意思是:查询数据包太大 建议修改max_allowed_packet参数值。 针对我执行的插入操作来说,意味着一次性执行的sql语句太大,超过了mysql默认设置的值(我用的是...

    Mysql的longblob字段插入数据问题解决

    想改变这个问题,需要注意几点: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (2054817 > 1048576). You can change this value on the server by setting the max_allowed_packet’ ...

    88秒插入1000万条数据到MySQL数据库表的操作方法

    com.mysql.jdbc.PacketTooBigException: Packet for query is too large (4232009 > 4194304). You can change this value on the server by setting the max_allowed_packet’ variable. 出现上面的错误是因为...

    mysql5.7 修改max_allowed_packet方法

    如果设置得过小,则可能会遇到“packet for query is too large”的错误。默认情况下,`max_allowed_packet` 的值通常为1MB或更小,这对于大多数应用来说已经足够,但在处理大量数据时可能需要对其进行调整。 #### ...

    启动报错:验证加密狗无效 error:1001-mysql参数导致.docx

    nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1280 > 1024). You can change this value on the server by setting the max_allowed_packet' variable ``` - **...

    MySQL批量插入和唯一索引问题的解决方法

    MySQL批量插入问题 ...nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (5677854 > 1048576). You can change this value on the server by setting the max_allowed_pac

    Mysql的max_allowed_packet设定

    当日志中出现了诸如:“Package for query is too large (xxxxxxxx > 4194304). You can change this value on the server by setting the max_allowed_package variable”的提示的时候,错误的本身就清楚的提示了...

    rfc全部文档离线下载rfc1-rfc8505

    is attempting to send too much over one link. We note, however, that since the IMP at the destination does not have enough capacity to handle all 32 links simultaneously, the links serve their ...

    Bochs - The cross platform IA-32 (x86) emulator

    - Added support for VGA graphics mode with 400 lines (partial fix for SF bug #2948724) - NE2K: Fixed "send buffer" command issue on big endian hosts - USB - converted common USB code plus devices ...

    DebuggingWithGDB 6.8-2008

    4.1 Compiling for Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Starting your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

    MySQL中文参考手册

    * 0 译者序 * 1 MySQL的一般的信息 o 1.1 什么是MySQL? o 1.2 关于本手册 + 1.2.1 本手册中使用的约定 o 1.3 MySQL的历史 o 1.4 MySQL的主要特征 o 1.5 MySQL稳定性? o 1.6 顺应2000年 ...

    MYSQL

    18.2.3 Host '...' is blocked错误 18.2.4 Out of memory错误 18.2.5 Packet too large错误 18.2.6 The table is full错误 18.2.7 Commands out of sync in client错误 18.2.8 Ignoring ...

    MySQL中文参考手册.chm

    MySQL中文参考手册.chm 449kb <br/>0 译者序 1 MySQL的一般的信息 1.1 什么是MySQL? 1.2 关于本手册 1.2.1 本手册中使用的约定 1.3 MySQL的历史 1.4 MySQL的主要特征 1.5...

Global site tag (gtag.js) - Google Analytics