diff --git a/bitnami/percona-mysql/8.1/debian-12/Dockerfile b/bitnami/percona-mysql/8.1/debian-12/Dockerfile index 9784eb73d463..e22debf0b5be 100644 --- a/bitnami/percona-mysql/8.1/debian-12/Dockerfile +++ b/bitnami/percona-mysql/8.1/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-07-06T09:21:48Z" \ + org.opencontainers.image.created="2024-07-17T06:56:29Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql/README.md" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="8.1.0-1-debian-12-r26" \ + org.opencontainers.image.ref.name="8.1.0-1-debian-12-r27" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql" \ org.opencontainers.image.title="percona-mysql" \ org.opencontainers.image.vendor="Broadcom, Inc." \ diff --git a/bitnami/percona-mysql/8.1/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh b/bitnami/percona-mysql/8.1/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh index 2fe2d93bf919..e329fbac8ef6 100644 --- a/bitnami/percona-mysql/8.1/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh +++ b/bitnami/percona-mysql/8.1/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh @@ -401,7 +401,11 @@ EOF if [[ -z "$DB_REPLICATION_MODE" ]] || [[ "$DB_REPLICATION_MODE" = "master" ]]; then if [[ "$DB_REPLICATION_MODE" = "master" ]]; then debug "Starting replication" - echo "RESET BINARY LOGS AND GTIDS;" | debug_execute "$DB_BIN_DIR/mysql" --defaults-file="$DB_CONF_FILE" -N -u root + if [[ "$(mysql_get_version)" =~ ^8\.0\. ]]; then + echo "RESET MASTER;" | debug_execute "$DB_BIN_DIR/mysql" --defaults-file="$DB_CONF_FILE" -N -u root + else + echo "RESET BINARY LOGS AND GTIDS;" | debug_execute "$DB_BIN_DIR/mysql" --defaults-file="$DB_CONF_FILE" -N -u root + fi fi mysql_ensure_root_user_exists "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" "$DB_AUTHENTICATION_PLUGIN" mysql_ensure_user_not_exists "" # ensure unknown user does not exist