进入mysql(mariadb) mysql -u root -p
show global variables like 'max_allowed_packet'; #显示 max_allowed_packet 值
set global max_allowed_packet = 16*1024*1024; #设置max_allowed_packet值为16M
并且修改了/etc/my.cnf,添加下面这行
max_allowed_packet=16M
systemctl restart mariadb.service #重启MariaDB