Packet for query is too large (1550606 > 1048576). You can change this value on the server by setting the max_allowed_ packet' variable. at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3915) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2598) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379) at com.hq.sql.Mysql.insert(Mysql.java:152) at com.hq.sql.SqlExcution.query2Insert(SqlExcution.java:90) at com.hq.schedule.Schedule.main(Schedule.java:27) --------------------------------------------------------------------------------------------------------------------- 产生的主要原因就是,查询返回的数据量比较大,而允许返回的”max_allowed_packet”太小,导致以上错误。 在linux系统下,找到/etc/my.cnf文件,修改max_allowed_packet=50M,重启mysql服务