在MySQL数据库里某表有一个blob字段,当上传文件超过1M的时候出现下面的错误:
PreparedStatementCallback; SQL [insert into uos.docfile(remark,content,email,addtime,filename) values ('654645',?,'[email protected]',NOW(),'飞得更高-汪峰.mp3' )]; Packet for query is too large (6571400 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.; nested exception is com.mysql.jdbc.PacketTooBigException: Packet for query is too large (6571400 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.Pr