diff --git a/bitnami/mysql/8.0/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh b/bitnami/mysql/8.0/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh index 435345e23a2ac..eb4ff34afe846 100644 --- a/bitnami/mysql/8.0/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh +++ b/bitnami/mysql/8.0/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh @@ -192,9 +192,9 @@ mysql_exec_initial_dump() { info "LOCK MASTER DATABASES FOR WRITE OPERATIONS..." mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'FLUSH TABLES WITH READ LOCK;' - + info "SHOW MASTER STATUS..." - read -r MYSQL_FILE MYSQL_POSITION <<< $(mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'SHOW MASTER STATUS;' | awk 'NR==1 {print $1, $2}') + read -r MYSQL_FILE MYSQL_POSITION <<< "$(mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'SHOW MASTER STATUS;' | awk 'NR==1 {print $1, $2}')" info "File: $MYSQL_FILE and Position: $MYSQL_POSITION" info "Start dump process databases" @@ -218,7 +218,7 @@ MASTER_PORT=$DB_MASTER_PORT_NUMBER, MASTER_USER='$DB_REPLICATION_USER', MASTER_PASSWORD='$DB_REPLICATION_PASSWORD', MASTER_DELAY=$DB_MASTER_DELAY, -MASTER_LOG_FILE='$MYSQL_FILE', +MASTER_LOG_FILE='$MYSQL_FILE', MASTER_LOG_POS=$MYSQL_POSITION, MASTER_CONNECT_RETRY=10; EOF diff --git a/bitnami/mysql/8.3/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh b/bitnami/mysql/8.3/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh index 435345e23a2ac..eb4ff34afe846 100644 --- a/bitnami/mysql/8.3/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh +++ b/bitnami/mysql/8.3/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh @@ -192,9 +192,9 @@ mysql_exec_initial_dump() { info "LOCK MASTER DATABASES FOR WRITE OPERATIONS..." mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'FLUSH TABLES WITH READ LOCK;' - + info "SHOW MASTER STATUS..." - read -r MYSQL_FILE MYSQL_POSITION <<< $(mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'SHOW MASTER STATUS;' | awk 'NR==1 {print $1, $2}') + read -r MYSQL_FILE MYSQL_POSITION <<< "$(mysql -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" -se 'SHOW MASTER STATUS;' | awk 'NR==1 {print $1, $2}')" info "File: $MYSQL_FILE and Position: $MYSQL_POSITION" info "Start dump process databases" @@ -218,7 +218,7 @@ MASTER_PORT=$DB_MASTER_PORT_NUMBER, MASTER_USER='$DB_REPLICATION_USER', MASTER_PASSWORD='$DB_REPLICATION_PASSWORD', MASTER_DELAY=$DB_MASTER_DELAY, -MASTER_LOG_FILE='$MYSQL_FILE', +MASTER_LOG_FILE='$MYSQL_FILE', MASTER_LOG_POS=$MYSQL_POSITION, MASTER_CONNECT_RETRY=10; EOF