mysqldump: Error 2020: Got packet bigger than ‘max
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysqldump: Error 2020: Got packet bigger than ‘max相关的知识,希望对你有一定的参考价值。
今天在对公司confluence 进行mysqldump备份的时候发现了一个报错
[[email protected] 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
[[email protected] mysqldump]# vim /etc/my.cnf
添加如下行
max_allowed_packet=512M
[[email protected] 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
以上是关于mysqldump: Error 2020: Got packet bigger than ‘max的主要内容,如果未能解决你的问题,请参考以下文章
mysqldump报错 – Error 2013 Lost connection to MySQL server
mysqldump导出报错"mysqldump: Error 2013: Lost connection to MySQL server during query when dumping
mysqldump: Got error: 1102: Incorrect database nam
带有 exec.Command 的 mysqldump 导致 1045 错误,但在终端上工作正常