From c0e5fab4431b045114d2ccff5664ab56cd0a86d1 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Wed, 16 Oct 2024 01:17:51 +0000 Subject: [PATCH] [bitnami/mysql] Release mysql-8.0.39-debian-12-r6 Signed-off-by: Bitnami Bot --- bitnami/mysql/8.0/debian-12/Dockerfile | 6 +-- .../opt/bitnami/.bitnami_components.json | 2 +- .../rootfs/opt/bitnami/scripts/libmysql.sh | 50 ++++++++----------- 3 files changed, 24 insertions(+), 34 deletions(-) diff --git a/bitnami/mysql/8.0/debian-12/Dockerfile b/bitnami/mysql/8.0/debian-12/Dockerfile index a66ed223cd389..5e7b32f4a2e94 100644 --- a/bitnami/mysql/8.0/debian-12/Dockerfile +++ b/bitnami/mysql/8.0/debian-12/Dockerfile @@ -7,11 +7,11 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2024-09-16T00:14:03Z" \ + org.opencontainers.image.created="2024-10-16T00:49:10Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/mysql/README.md" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="8.0.39-debian-12-r5" \ + org.opencontainers.image.ref.name="8.0.39-debian-12-r6" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/mysql" \ org.opencontainers.image.title="mysql" \ org.opencontainers.image.vendor="Broadcom, Inc." \ @@ -28,7 +28,7 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] RUN install_packages ca-certificates curl gcc-11 libaio1 libcom-err2 libgcc-s1 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libsasl2-2 libssl3 libstdc++6 libtinfo6 libtirpc3 procps psmisc RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ COMPONENTS=( \ - "ini-file-1.4.7-4-linux-${OS_ARCH}-debian-12" \ + "ini-file-1.4.7-5-linux-${OS_ARCH}-debian-12" \ "mysql-8.0.39-0-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ diff --git a/bitnami/mysql/8.0/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/mysql/8.0/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json index 6f440720bbddf..e72260c0a4f06 100644 --- a/bitnami/mysql/8.0/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/mysql/8.0/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,7 +3,7 @@ "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "1.4.7-4" + "version": "1.4.7-5" }, "mysql": { "arch": "amd64", 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 197749817ba1c..3866567ca3006 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 @@ -185,47 +185,38 @@ EOF # None ######################### mysql_exec_initial_dump() { - info "MySQL dump master data start..." - - 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}')" - info "File: $MYSQL_FILE and Position: $MYSQL_POSITION" - - info "Start dump process databases" - - FILE_LOCATION="$DB_DATA_DIR/dump_all_databases.sql" + local -r dump_file="${DB_DATA_DIR}/dump_all_databases.sql" - mysqldump --verbose --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" > "$FILE_LOCATION" + info "MySQL dump master data start..." + debug "Lock master databases for write operations" + echo "FLUSH TABLES WITH READ LOCK;" | mysql_remote_execute "$DB_MASTER_HOST" "$DB_MASTER_PORT_NUMBER" "mysql" "$DB_MASTER_ROOT_USER" "$DB_MASTER_ROOT_PASSWORD" - info "Finish dump databases" + read -r log_file log_position <<< "$(echo "SHOW MASTER STATUS;" | mysql_remote_execute_print_output "$DB_MASTER_HOST" "$DB_MASTER_PORT_NUMBER" "mysql" "$DB_MASTER_ROOT_USER" "$DB_MASTER_ROOT_PASSWORD" | awk 'NR==1 {print $1, $2}')" + debug "File: $log_file and Position: $log_position" - info "UNLOCK 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 'UNLOCK TABLES;' + debug "Start dump process databases" + mysqldump --verbose --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" > "$dump_file" + debug "Finish dump databases" - info "Start import dump databases" - mysql_execute < "$FILE_LOCATION" - info "Finish import dump databases" + debug "Unlock master databases for write operations" + echo "UNLOCK TABLES;" | mysql_remote_execute "$DB_MASTER_HOST" "$DB_MASTER_PORT_NUMBER" "mysql" "$DB_MASTER_ROOT_USER" "$DB_MASTER_ROOT_PASSWORD" + debug "Start import dump databases" + mysql_execute < "$dump_file" mysql_execute "mysql" <