Got a packet bigger than 'max_allowed_packet' bytes

导入Mysql报错,如下:
Got a packet bigger than 'max_allowed_packet' bytes
我的导入方式:
nohup mysql -h127.0.0.1 -uuser -ppass dbname
解决办法,编辑my.conf 添加配置重启mysql生效

[root@mailvip mysql]# vim /etc/my.cnf
max_allowed_packet=100M
[root@mailvip mysql]# /etc/init.d/mysqld restart
停止 mysqld:                                              [确定]
正在启动 mysqld:                                          [确定]
[root@mailvip mysql]#`

你可能感兴趣的:(Got a packet bigger than 'max_allowed_packet' bytes)