需求: 在更改头像的时候报这个错误 解决方案: show VARIABLES like '%max_allowed_packet%'; 在mysql安装文件目录找到my.conf 重启mysql服务 查看是否修改成功: