mysqldump备份报错 'max_allowed_packet'
1.mysqldump备份报错
[root@176-238 bin]# ./mysqldump -uroot -p'123456' --default-character-set=utf8 --opt -R -E confluence > /data/backup/20221109/confluence20221109.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table `plugindata` at row: 0
2.报错原因
#报错原因是因为某些字段的数据太大超过默认值,需要修改导出的的数据包大小,需要在导出时使用--max_allowed_packet=512M
如:
./mysqldump -uroot -p'123456' --max_allowed_packet=512M --default-character-set=utf8 --opt -R -E confluence > /data/backup/20221109/confluence20221109.sql