在mysql的安装目录找到my.ini文件,在文件后面加上
max_allowed_packet=20M

 

通过

SHOW VARIABLES LIKE '%max_allowed_packet%';

验证配置是否生效

相关文章: