今天在对公司confluence 进行mysqldump备份的时候发现了一个报错
[root@confluence mysqldump]#mysqldump --max_allowed_packet=1G -u root -p -B -F -R -x confluence|gzip > /mysqldump/confluence_$(date +%Y%m%d_%H%M%S).sql.gz
mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes when dumping table `QPR` at row: 5659
[root@confluence mysqldump]# vim /etc/my.cnf
添加如下行
max_allowed_packet=512M
[root@confluence mysqldump]# service mysqld restart
第二种在线:
mysqldump --max_allowed_packet=1G -u root -p$PASSWD -B -F -R -x confluence > /mysqldump/confluence_$(date +%Y%m%d_%H%M%S).sql