Parameter of prepared statement which is set through mysql_send_long_data() is longer than 'max_allo

mysql上传大数据文件时,传输的数据过大就会抛出如下错误。

解决方式:打开mysql安装路径,找到my.ini文件打开。Parameter of prepared statement which is set through mysql_send_long_data() is longer than 'max_allo

打开之后,在最末尾加上一句:max_allowed_packet=10485760

10485760k也就是10M。当然你也可以设置更大