sync_databases_between_mysql_installations.sh: allow adjusting mysqldunp parameter '--max-allowed-packet'.

This commit is contained in:
Christoph 2023-08-08 23:17:26 +02:00
parent 321156508c
commit 16685fe43b

View File

@ -52,6 +52,11 @@ mysql_target_version="$(${mysql_target_exe} -V | awk '{print$5}')"
mysql_source_version="${mysql_source_version%\,}"
mysql_target_version="${mysql_target_version%\,}"
# - mysqldump parameters/options
# -
mysql_max_allowed_packet="1024M"
# -------------
# --- Some functions
# -------------
@ -229,7 +234,7 @@ fi
if $_got_mysql_databases ; then
log_file=${log_dir}/sync_mysql.log
> $log_file
mysqldump_flags="--protocol=SOCKET --max_allowed_packet=128M --skip-opt --add-drop-table --add-locks --create-options --quick --set-charset --disable-keys --lock-tables --routines"
mysqldump_flags="--protocol=SOCKET --max-allowed-packet=${mysql_max_allowed_packet} --skip-opt --add-drop-table --add-locks --create-options --quick --set-charset --disable-keys --lock-tables --routines"
# - GET current (global) Autocommit value