[bitnami/mysql] Release 8.3.0-debian-12-r12 (#67610)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Bitnami Bot 2024-06-06 14:01:48 +02:00 committed by GitHub
parent 5db282fcc6
commit 7f363a7069
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 35 additions and 32 deletions

View File

@ -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-05-13T22:55:37Z" \
org.opencontainers.image.created="2024-06-06T11:05:46Z" \
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.3.0-debian-12-r11" \
org.opencontainers.image.ref.name="8.3.0-debian-12-r12" \
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.6-13-linux-${OS_ARCH}-debian-12" \
"ini-file-1.4.6-14-linux-${OS_ARCH}-debian-12" \
"mysql-8.3.0-3-linux-${OS_ARCH}-debian-12" \
) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \

View File

@ -3,7 +3,7 @@
"arch": "amd64",
"distro": "debian-12",
"type": "NAMI",
"version": "1.4.6-13"
"version": "1.4.6-14"
},
"mysql": {
"arch": "amd64",

View File

@ -8,6 +8,7 @@
# Load Generic Libraries
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libvalidations.sh
# Functions
@ -68,7 +69,12 @@ get_machine_ip() {
error "Could not find any IP address associated to hostname ${hostname}"
exit 1
fi
echo "${ip_addresses[0]}"
# Check if the first IP address is IPv6 to add brackets
if validate_ipv6 "${ip_addresses[0]}" ; then
echo "[${ip_addresses[0]}]"
else
echo "${ip_addresses[0]}"
fi
}
########################

View File

@ -32,9 +32,9 @@ mysql_extra_flags() {
if [[ -n "$DB_REPLICATION_MODE" ]]; then
randNumber="$(head /dev/urandom | tr -dc 0-9 | head -c 3 ; echo '')"
dbExtraFlags+=("--server-id=$randNumber" "--binlog-format=ROW" "--log-bin=mysql-bin" "--sync-binlog=1")
dbExtraFlags+=("--server-id=$randNumber" "--log-bin=mysql-bin" "--sync-binlog=1")
if [[ "$DB_REPLICATION_MODE" = "slave" ]]; then
dbExtraFlags+=("--relay-log=mysql-relay-bin" "--log-slave-updates=1" "--read-only=1")
dbExtraFlags+=("--relay-log=mysql-relay-bin" "--log-replica-updates=1" "--read-only=1")
elif [[ "$DB_REPLICATION_MODE" = "master" ]]; then
dbExtraFlags+=("--innodb_flush_log_at_trx_commit=1")
fi
@ -210,14 +210,15 @@ mysql_exec_initial_dump() {
info "Finish import dump databases"
mysql_execute "mysql" <<EOF
CHANGE MASTER TO MASTER_HOST='$DB_MASTER_HOST',
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_POS=$MYSQL_POSITION,
MASTER_CONNECT_RETRY=10;
CHANGE REPLICATION SOURCE TO SOURCE_HOST='$DB_MASTER_HOST',
SOURCE_PORT=$DB_MASTER_PORT_NUMBER,
SOURCE_USER='$DB_REPLICATION_USER',
SOURCE_PASSWORD='$DB_REPLICATION_PASSWORD',
SOURCE_DELAY=$DB_MASTER_DELAY,
SOURCE_LOG_FILE='$MYSQL_FILE',
SOURCE_LOG_POS=$MYSQL_POSITION,
SOURCE_CONNECT_RETRY=10,
GET_SOURCE_PUBLIC_KEY=1;
EOF
info "Remove dump file"
@ -252,12 +253,13 @@ mysql_configure_replication() {
debug "Replication master ready!"
debug "Setting the master configuration"
mysql_execute "mysql" <<EOF
CHANGE MASTER TO MASTER_HOST='$DB_MASTER_HOST',
MASTER_PORT=$DB_MASTER_PORT_NUMBER,
MASTER_USER='$DB_REPLICATION_USER',
MASTER_PASSWORD='$DB_REPLICATION_PASSWORD',
MASTER_DELAY=$DB_MASTER_DELAY,
MASTER_CONNECT_RETRY=10;
CHANGE REPLICATION SOURCE TO SOURCE_HOST='$DB_MASTER_HOST',
SOURCE_PORT=$DB_MASTER_PORT_NUMBER,
SOURCE_USER='$DB_REPLICATION_USER',
SOURCE_PASSWORD='$DB_REPLICATION_PASSWORD',
SOURCE_DELAY=$DB_MASTER_DELAY,
SOURCE_CONNECT_RETRY=10,
GET_SOURCE_PUBLIC_KEY=1;
EOF
fi
@ -284,15 +286,10 @@ mysql_ensure_replication_user_exists() {
local -r password="${2:-}"
debug "Configure replication user credentials"
if [[ "$DB_FLAVOR" = "mariadb" ]]; then
mysql_execute "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
create or replace user '$user'@'%' $([ "$password" != "" ] && echo "identified by \"$password\"");
mysql_execute "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
create user '$user'@'%' $([ "$password" != "" ] && echo "identified by \"$password\"");
EOF
else
mysql_execute "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
create user '$user'@'%' $([ "$password" != "" ] && echo "identified with 'mysql_native_password' by \"$password\"");
EOF
fi
mysql_execute "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
grant REPLICATION SLAVE on *.* to '$user'@'%' with grant option;
flush privileges;
@ -363,7 +360,7 @@ EOF
if [[ -z "$DB_REPLICATION_MODE" ]] || [[ "$DB_REPLICATION_MODE" = "master" ]]; then
if [[ "$DB_REPLICATION_MODE" = "master" ]]; then
debug "Starting replication"
echo "RESET MASTER;" | debug_execute "$DB_BIN_DIR/mysql" --defaults-file="$DB_CONF_FILE" -N -u root
echo "RESET BINARY LOGS AND GTIDS;" | debug_execute "$DB_BIN_DIR/mysql" --defaults-file="$DB_CONF_FILE" -N -u root
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
@ -464,8 +461,8 @@ mysql_start_bg() {
# Do not start as root, to avoid permission issues
am_i_root && flags+=("--user=${DB_DAEMON_USER}")
# The slave should only start in 'run.sh', elseways user credentials would be needed for any connection
flags+=("--skip-slave-start")
# The replica should only start in 'run.sh', elseways user credentials would be needed for any connection
flags+=("--skip-replica-start")
flags+=("$@")
is_mysql_running && return