Home  >  Article  >  Database  >  Mysql的longblob字段插入数据问题解决_MySQL

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

WBOY
WBOYOriginal
2016-05-27 14:12:061194browse

bitsCN.com 在使用mysql的过程中,有个问题就是mysql的优化,mysql中longblob字段在5.5版本中默认的为1M。

想改变这个问题,需要注意几点:

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' variable.

原因:myslq默认配置最小的需要更改 :在mysql.ini中配置参数(max_allowed_packet=1024M) ;

但是在[client]和[mysql]部分添加始终没有效果,貌似是客户端读取的参数。所以需要注意这点。bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn