Skip to content

Commit 25c7553

Browse files
Added max_allowed_packet parameter to mysql dump (hestiacp#2211)
* Added max_allowed_packet parameter to mysql dump At 10.5.10-MariaDB, I got backup error when mysql dump. mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' when dumping table ... my.cnf value is 1G. max_allowed_packet = 1G I added, [mysqldump] max_allowed_packet = 1G not worked. These are not fix the problem. When I added --max_allowed_packet=128M to the command line, it works without any problem. * Use --defaults-extra-file instead of max-allowed-package size This config will also include mysql config it self for extra settings if need Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent b3eeed5 commit 25c7553

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

func/db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ mysql_query() {
9696

9797
mysql_dump() {
9898
err="/tmp/e.mysql"
99-
mysqldump --defaults-file=$mycnf --single-transaction --routines -r $1 $2 2> $err
99+
mysqldump --defaults-extra-file=$mycnf --single-transaction --routines -r $1 $2 2> $err
100100
if [ '0' -ne "$?" ]; then
101101
rm -rf $tmpdir
102102
if [ "$notify" != 'no' ]; then

0 commit comments

Comments
 (0)