[bitnami/mysql] Release 9.7.0-debian-12-r5 (#94475)

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
Bitnami Bot
2026-06-09 17:02:48 +02:00
committed by GitHub
parent 446a2b56d2
commit bbb2762d77
14 changed files with 210 additions and 77 deletions
+7 -7
View File
@@ -7,7 +7,7 @@ ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
ARG TARGETARCH
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
org.opencontainers.image.created="2026-05-23T09:42:33Z" \
org.opencontainers.image.created="2026-06-09T14:46:20Z" \
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.source="https://github.com/bitnami/containers/tree/main/bitnami/mysql" \
@@ -28,18 +28,18 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \
DOWNLOADS_URL=${SECRET_DOWNLOADS_URL:-${DOWNLOADS_URL}} ; \
mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \
COMPONENTS=( \
"ini-file-1.4.9-10-linux-${OS_ARCH}-debian-12" \
"ini-file-1.4.9-11-linux-${OS_ARCH}-debian-12" \
"mysql-9.7.0-0-linux-${OS_ARCH}-debian-12" \
) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
fi ; \
sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
sha256sum -c "/opt/bitnami/checksums/${COMPONENT}.tar.gz.sha256" ; \
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner ; \
rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
done
rm -rf "${COMPONENT}".tar.gz ; \
done ; \
rm -rf /opt/bitnami/checksums ;
RUN apt-get update && apt-get upgrade -y && \
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
RUN chmod g+rwX /opt/bitnami
@@ -51,7 +51,7 @@ COPY rootfs /
RUN /opt/bitnami/scripts/mysql/postunpack.sh
ENV APP_VERSION="9.7.0" \
BITNAMI_APP_NAME="mysql" \
IMAGE_REVISION="4" \
IMAGE_REVISION="5" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/mysql/bin:/opt/bitnami/mysql/sbin:$PATH"
EXPOSE 3306
@@ -0,0 +1 @@
4134a42e91271bd0a48f2d6d172910afdfbcaf5251bb8c8bd49e9700aa66d99f ini-file-1.4.9-11-linux-amd64-debian-12.tar.gz
@@ -0,0 +1 @@
caafc64b69e970f938d535c3aaf7e66420e0dba2c5cbd332e55ccdfd926eed66 ini-file-1.4.9-11-linux-arm64-debian-12.tar.gz
@@ -0,0 +1 @@
2e914c26aa71b42aaecb4a328ddee9a3bb53d85c8fcea1aba7604bbc017a566c mysql-9.7.0-0-linux-amd64-debian-12.tar.gz
@@ -0,0 +1 @@
e2db40cdd159d6268626313f0db467cac1db826277933e02fb346dd087af6d0a mysql-9.7.0-0-linux-arm64-debian-12.tar.gz
@@ -139,3 +139,40 @@ wait_for_log_entry() {
return 1
fi
}
########################
# Creates a secure temporary file containing the provided secret
# Arguments:
# $1 - secret to write to the temporary file
# Returns:
# String
#########################
credential_to_temp_file() {
local secret="$1"
local tmp_file
# Use mktemp with a specific prefix for easier debugging if something lingers
if ! tmp_file=$(mktemp "${TMPDIR:-/tmp}/at.cred.XXXXXXXX"); then
echo "Error: Failed to create temp file" >&2
return 1
fi
# Restrict permissions before writing the secret
chmod 0600 "$tmp_file"
# Write secret and ensure it's flushed to disk
printf "%s" "$secret" > "$tmp_file"
# Output the filename so the caller can capture it
echo "$tmp_file"
}
########################
# Cleans up temporary files created by credential_to_temp_file
# Arguments:
# None
# Returns:
# None
#########################
cleanup_credentials() {
debug "Cleaning up temporary files containing credentials"
rm -rf "${TMPDIR:-/tmp}"/at.cred.*
}
@@ -131,6 +131,7 @@ relativize() {
# -d|--dir-mode - mode for files.
# -u|--user - user
# -g|--group - group
# -n|--no-dereference - do not follow symlinks (use for runtime root chown of daemon-writable dirs)
# Returns:
# None
#########################
@@ -140,6 +141,7 @@ configure_permissions_ownership() {
local file_mode=""
local user=""
local group=""
local follow_symlinks="yes"
# Validate arguments
shift 1
@@ -161,6 +163,9 @@ configure_permissions_ownership() {
shift
group="${1:?missing group}"
;;
-n | --no-dereference)
follow_symlinks="no"
;;
*)
echo "Invalid command line flag $1" >&2
return 1
@@ -169,22 +174,29 @@ configure_permissions_ownership() {
shift
done
# -L: follow symlinks and emits the target path
# This is dangerous at runtime, given a co-located lower-privileged process with write access
# to the target path can redirect the chown/chmod to arbitrary paths. Example:
# Lower-privileged process run: ln -s /etc /tmp/etc
# Then, setup.sh runs: configure_permissions_ownership --dir-mode 775 /tmp
local find_L_flag=(); [[ "$follow_symlinks" == "yes" ]] && find_L_flag=("-L")
# -h: changes symlink inode ownership without touching the target.
local chown_flags=(); [[ "$follow_symlinks" == "no" ]] && chown_flags=("-h")
read -r -a filepaths <<<"$paths"
for p in "${filepaths[@]}"; do
if [[ -e "$p" ]]; then
find -L "$p" -printf ""
if [[ -n $dir_mode ]]; then
find -L "$p" -type d ! -perm "$dir_mode" -print0 | xargs -r -0 chmod "$dir_mode"
find "${find_L_flag[@]}" "$p" -not -type l -type d ! -perm "$dir_mode" -print0 | xargs -r -0 chmod "$dir_mode"
fi
if [[ -n $file_mode ]]; then
find -L "$p" -type f ! -perm "$file_mode" -print0 | xargs -r -0 chmod "$file_mode"
find "${find_L_flag[@]}" "$p" -not -type l -type f ! -perm "$file_mode" -print0 | xargs -r -0 chmod "$file_mode"
fi
if [[ -n $user ]] && [[ -n $group ]]; then
find -L "$p" -print0 | xargs -r -0 chown "${user}:${group}"
find "${find_L_flag[@]}" "$p" -print0 | xargs -r -0 chown "${chown_flags[@]}" "${user}:${group}"
elif [[ -n $user ]] && [[ -z $group ]]; then
find -L "$p" -print0 | xargs -r -0 chown "${user}"
find "${find_L_flag[@]}" "$p" -print0 | xargs -r -0 chown "${chown_flags[@]}" "${user}"
elif [[ -z $user ]] && [[ -n $group ]]; then
find -L "$p" -print0 | xargs -r -0 chgrp "${group}"
find "${find_L_flag[@]}" "$p" -print0 | xargs -r -0 chgrp "${chown_flags[@]}" "${group}"
fi
else
stderr_print "$p does not exist"
@@ -170,7 +170,7 @@ ensure_user_exists() {
if [[ -n "$home" ]]; then
mkdir -p "$home"
usermod -d "$home" "$user" >/dev/null 2>&1
configure_permissions_ownership "$home" -d "775" -f "664" -u "$user" -g "$group"
configure_permissions_ownership "$home" -d "775" -f "664" -u "$user" -g "$group" -n
fi
}
@@ -20,7 +20,7 @@
#########################
is_int() {
local -r int="${1:?missing value}"
if [[ "$int" =~ ^-?[0-9]+ ]]; then
if [[ "$int" =~ ^-?[0-9]+$ ]]; then
true
else
false
@@ -49,3 +49,36 @@ get_sematic_version () {
fi
fi
}
########################
# Compares two semantic versions
# Arguments:
# $1 - version1: first version to compare
# $2 - version2: second version to compare
# Returns:
# -1 if version1 is less than version2
# 0 if version1 is equal to version2
# 1 if version1 is greater than version2
#########################
compare_semantic_versions() {
local version1="${1:?version1 is required}"
local version2="${2:?version2 is required}"
local major1 major2 minor1 minor2 patch1 patch2
major1="$(get_sematic_version "$version1" 1)"
major2="$(get_sematic_version "$version2" 1)"
minor1="$(get_sematic_version "$version1" 2)"
minor2="$(get_sematic_version "$version2" 2)"
patch1="$(get_sematic_version "$version1" 3)"
patch2="$(get_sematic_version "$version2" 3)"
if [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -eq "$minor2" ]] && [[ "$patch1" -eq "$patch2" ]]; then
echo "0"
elif [[ "$major1" -lt "$major2" ]] ||
{ [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -lt "$minor2" ]]; } ||
{ [[ "$major1" -eq "$major2" ]] && [[ "$minor1" -eq "$minor2" ]] && [[ "$patch1" -lt "$patch2" ]]; }; then
echo "-1"
else
echo "1"
fi
}
@@ -96,6 +96,10 @@ mysql_validate() {
if [[ -z "$DB_MASTER_HOST" ]]; then
print_validation_error "Slave replication mode chosen without setting the environment variable $(get_env_var MASTER_HOST). Use it to indicate where the Master node is running"
fi
if ! is_boolean_yes "$DB_REPLICATION_USE_SSL"; then
warn "SSL is not enabled for replication. MITM substitution of the RSA public key can recover DB_REPLICATION_PASSWORD."
fi
else
print_validation_error "Invalid replication mode. Available options are 'master/slave'"
fi
@@ -179,6 +183,27 @@ pid_file=${DB_PID_FILE}
EOF
}
########################
# Helper to get the SSL clause for replication
# Globals:
# DB_*
# Arguments:
# None
# Returns:
# SSL clause for replication
#########################
mysql_replication_ssl_clause() {
local replication_ssl_clause
if is_boolean_yes "$DB_REPLICATION_USE_SSL"; then
replication_ssl_clause="SOURCE_SSL=1,"
ca_file="$(mysql_client_env_value "SSL_CA_FILE")"
[[ -f "$ca_file" ]] && replication_ssl_clause+=" SOURCE_SSL_CA='${ca_file}', SOURCE_SSL_VERIFY_SERVER_CERT=1,"
else
replication_ssl_clause="GET_SOURCE_PUBLIC_KEY=1,"
fi
echo "$replication_ssl_clause"
}
########################
# Make a dump on master database and update slave database
# Globals:
@@ -191,8 +216,13 @@ EOF
mysql_exec_initial_dump() {
local -r dump_file="${DB_DATA_DIR}/dump_all_databases.sql"
local ssl_flags=()
is_boolean_yes "$DB_REPLICATION_USE_SSL" && ssl_flags+=("--ssl-mode=REQUIRED")
ca_file="$(mysql_client_env_value "SSL_CA_FILE")"
[[ -f "$ca_file" ]] && ssl_flags+=("--ssl-ca=${ca_file}")
info "MySQL dump master data start..."
mysqldump --verbose --single-transaction --quick --source-data=2 --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" -p"$DB_MASTER_ROOT_PASSWORD" > "$dump_file"
MYSQL_PWD="$DB_MASTER_ROOT_PASSWORD" mysqldump --verbose --single-transaction --quick --source-data=2 --all-databases -h "$DB_MASTER_HOST" -P "$DB_MASTER_PORT_NUMBER" -u "$DB_MASTER_ROOT_USER" "${ssl_flags[@]}" > "$dump_file"
debug "Finish dump databases"
# Look for the line containing "CHANGE REPLICATION SOURCE"
@@ -215,8 +245,8 @@ SOURCE_PASSWORD='$DB_REPLICATION_PASSWORD',
SOURCE_DELAY=$DB_MASTER_DELAY,
SOURCE_LOG_FILE='$log_file',
SOURCE_LOG_POS=$log_position,
SOURCE_CONNECT_RETRY=10,
GET_SOURCE_PUBLIC_KEY=1;
$(mysql_replication_ssl_clause)
SOURCE_CONNECT_RETRY=10;
EOF
debug "Finish import dump databases"
@@ -252,8 +282,8 @@ 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;
$(mysql_replication_ssl_clause)
SOURCE_CONNECT_RETRY=10;
EOF
fi
@@ -632,7 +662,6 @@ mysql_execute_print_output() {
fi
args+=("-N" "-u" "$user")
[[ -n "$db" ]] && args+=("$db")
[[ -n "$pass" ]] && args+=("-p$pass")
[[ "${#opts[@]}" -gt 0 ]] && args+=("${opts[@]}")
[[ "${#extra_opts[@]}" -gt 0 ]] && args+=("${extra_opts[@]}")
@@ -640,12 +669,19 @@ mysql_execute_print_output() {
if [[ "${BITNAMI_DEBUG:-false}" = true ]]; then
local mysql_cmd
mysql_cmd="$(</dev/stdin)"
debug "Executing SQL command:\n$mysql_cmd"
"$(mysql_binary)" "${args[@]}" <<<"$mysql_cmd"
if [[ -n "$pass" ]]; then
MYSQL_PWD="$pass" "$(mysql_binary)" "${args[@]}" <<<"$mysql_cmd"
else
"$(mysql_binary)" "${args[@]}" <<<"$mysql_cmd"
fi
else
# Do not store the command(s) as a variable, to avoid issues when importing large files
# https://github.com/bitnami/bitnami-docker-mariadb/issues/251
"$(mysql_binary)" "${args[@]}"
if [[ -n "$pass" ]]; then
MYSQL_PWD="$pass" "$(mysql_binary)" "${args[@]}"
else
"$(mysql_binary)" "${args[@]}"
fi
fi
}
@@ -1357,10 +1393,10 @@ mysql_healthcheck() {
root_password="$(get_master_env_var_value ROOT_PASSWORD)"
if [[ -n "$root_password" ]]; then
args+=("-p${root_password}")
MYSQL_PWD="$root_password" mysqladmin "${args[@]}" ping && MYSQL_PWD="$root_password" mysqladmin "${args[@]}" status
else
mysqladmin "${args[@]}" ping && mysqladmin "${args[@]}" status
fi
mysqladmin "${args[@]}" ping && mysqladmin "${args[@]}" status
}
########################
@@ -1380,6 +1416,17 @@ mysql_client_flavor() {
fi
}
# Helper to get the proper value for the MySQL client environment variable
mysql_client_env_value() {
local env_name="MYSQL_CLIENT_${1:?missing name}"
if [[ -n "${!env_name:-}" ]]; then
echo "${!env_name:-}"
else
env_name="DB_CLIENT_${1}"
echo "${!env_name:-}"
fi
}
########################
# Prints extra options for MySQL client calls (i.e. SSL options)
# Globals:
@@ -1390,28 +1437,24 @@ mysql_client_flavor() {
# List of options to pass to "mysql" CLI
#########################
mysql_client_extra_opts() {
# Helper to get the proper value for the MySQL client environment variable
mysql_client_env_value() {
local env_name="MYSQL_CLIENT_${1:?missing name}"
if [[ -n "${!env_name:-}" ]]; then
echo "${!env_name:-}"
else
env_name="DB_CLIENT_${1}"
echo "${!env_name:-}"
fi
}
local -a opts=()
local key value
if is_boolean_yes "${DB_ENABLE_SSL:-no}"; then
ca_file="$(mysql_client_env_value "SSL_CA_FILE")"
if [[ "$(mysql_client_flavor)" = "mysql" ]]; then
opts+=("--ssl-mode=REQUIRED")
if [[ -f "$ca_file " ]]; then
opts+=("--ssl-mode=VERIFY_CA")
else
opts+=("--ssl-mode=REQUIRED")
fi
else
opts+=("--ssl=TRUE")
[[ -f "$ca_file" ]] && opts+=("--ssl-verify-server-cert")
fi
# Add "--ssl-ca", "--ssl-key" and "--ssl-cert" options if the env vars are defined
# Add "--ssl-ca", "--ssl-key" and "--ssl-cert" options if the env vars are defined and the files exist
for key in ca key cert; do
value="$(mysql_client_env_value "SSL_${key^^}_FILE")"
[[ -n "${value}" ]] && opts+=("--ssl-${key}=${value}")
[[ -f "${value}" ]] && opts+=("--ssl-${key}=${value}")
done
else
# Skip SSL validation
@@ -50,6 +50,7 @@ mysql_env_vars=(
MYSQL_UPGRADE
MYSQL_IS_DEDICATED_SERVER
MYSQL_CLIENT_ENABLE_SSL
MYSQL_REPLICATION_USE_SSL
MYSQL_CLIENT_SSL_CA_FILE
MYSQL_CLIENT_SSL_CERT_FILE
MYSQL_CLIENT_SSL_KEY_FILE
@@ -158,6 +159,8 @@ export MYSQL_IS_DEDICATED_SERVER="${MYSQL_IS_DEDICATED_SERVER:-}"
export DB_IS_DEDICATED_SERVER="$MYSQL_IS_DEDICATED_SERVER"
export MYSQL_CLIENT_ENABLE_SSL="${MYSQL_CLIENT_ENABLE_SSL:-no}"
export DB_CLIENT_ENABLE_SSL="$MYSQL_CLIENT_ENABLE_SSL"
export MYSQL_REPLICATION_USE_SSL="${MYSQL_REPLICATION_USE_SSL:-$DB_CLIENT_ENABLE_SSL}"
export DB_REPLICATION_USE_SSL="$MYSQL_REPLICATION_USE_SSL"
export MYSQL_CLIENT_SSL_CA_FILE="${MYSQL_CLIENT_SSL_CA_FILE:-}"
export DB_CLIENT_SSL_CA_FILE="$MYSQL_CLIENT_SSL_CA_FILE"
export MYSQL_CLIENT_SSL_CERT_FILE="${MYSQL_CLIENT_SSL_CERT_FILE:-}"
@@ -21,7 +21,7 @@ set -o pipefail
rm -rf "${DB_SOCKET_FILE}.lock"
# Ensure MySQL environment variables settings are valid
mysql_validate
# Ensure MySQL is stopped when this script ends.
# Ensure MySQL is stopped when this script ends
trap "mysql_stop" EXIT
if am_i_root; then
# Ensure 'daemon' user exists when running as 'root'
+37 -36
View File
@@ -76,42 +76,43 @@ The following tables list the main variables you can set.
#### Customizable environment variables
| Name | Description | Default Value |
|---------------------------------|---------------------------------------------------------------------------------------------------------------------------|---------------|
| `ALLOW_EMPTY_PASSWORD` | Allow MySQL access without any password. | `no` |
| `MYSQL_AUTHENTICATION_PLUGIN` | MySQL authentication plugin to configure during the first initialization. | `nil` |
| `MYSQL_ROOT_USER` | MySQL database root user. | `root` |
| `MYSQL_ROOT_PASSWORD` | MySQL database root user password. | `nil` |
| `MYSQL_USER` | MySQL database user to create during the first initialization. | `nil` |
| `MYSQL_PASSWORD` | Password for the MySQL database user to create during the first initialization. | `nil` |
| `MYSQL_DATABASE` | MySQL database to create during the first initialization. | `nil` |
| `MYSQL_MASTER_HOST` | Address for the MySQL master node. | `nil` |
| `MYSQL_MASTER_PORT_NUMBER` | Port number for the MySQL master node. | `3306` |
| `MYSQL_MASTER_ROOT_USER` | MySQL database root user of the master host. | `root` |
| `MYSQL_MASTER_ROOT_PASSWORD` | Password for the MySQL database root user of the the master host. | `nil` |
| `MYSQL_MASTER_DELAY` | MySQL database replication delay. | `0` |
| `MYSQL_REPLICATION_USER` | MySQL replication database user. | `nil` |
| `MYSQL_REPLICATION_PASSWORD` | Password for the MySQL replication database user. | `nil` |
| `MYSQL_PORT_NUMBER` | Port number to use for the MySQL Server service. | `nil` |
| `MYSQL_REPLICATION_MODE` | MySQL replication mode. | `nil` |
| `MYSQL_REPLICATION_SLAVE_DUMP` | Make a dump on master and update slave MySQL database | `false` |
| `MYSQL_EXTRA_FLAGS` | Extra flags to be passed to start the MySQL Server. | `nil` |
| `MYSQL_INIT_SLEEP_TIME` | Sleep time when waiting for MySQL init configuration operations to finish. | `nil` |
| `MYSQL_CHARACTER_SET` | MySQL collation to use. | `nil` |
| `MYSQL_COLLATE` | MySQL collation to use. | `nil` |
| `MYSQL_BIND_ADDRESS` | MySQL bind address. | `nil` |
| `MYSQL_SQL_MODE` | MySQL Server SQL modes to enable. | `nil` |
| `MYSQL_UPGRADE` | MySQL upgrade option. | `AUTO` |
| `MYSQL_IS_DEDICATED_SERVER` | Whether the MySQL Server will run on a dedicated node. | `nil` |
| `MYSQL_CLIENT_ENABLE_SSL` | Whether to force SSL for connections to the MySQL database. | `no` |
| `MYSQL_CLIENT_SSL_CA_FILE` | Path to CA certificate to use for SSL connections to the MySQL database server. | `nil` |
| `MYSQL_CLIENT_SSL_CERT_FILE` | Path to client public key certificate to use for SSL connections to the MySQL database server. | `nil` |
| `MYSQL_CLIENT_SSL_KEY_FILE` | Path to client private key to use for SSL connections to the MySQL database server. | `nil` |
| `MYSQL_CLIENT_EXTRA_FLAGS` | Whether to force SSL connections with the "mysql" CLI tool. Useful for applications that rely on the CLI instead of APIs. | `no` |
| `MYSQL_STARTUP_WAIT_RETRIES` | Number of retries waiting for the database to be running. | `300` |
| `MYSQL_STARTUP_WAIT_SLEEP_TIME` | Sleep time between retries waiting for the database to be running. | `2` |
| `MYSQL_ENABLE_SLOW_QUERY` | Whether to enable slow query logs. | `0` |
| `MYSQL_LONG_QUERY_TIME` | How much time, in seconds, defines a slow query. | `10.0` |
| Name | Description | Default Value |
|---------------------------------|---------------------------------------------------------------------------------------------------------------------------|-------------------------|
| `ALLOW_EMPTY_PASSWORD` | Allow MySQL access without any password. | `no` |
| `MYSQL_AUTHENTICATION_PLUGIN` | MySQL authentication plugin to configure during the first initialization. | `nil` |
| `MYSQL_ROOT_USER` | MySQL database root user. | `root` |
| `MYSQL_ROOT_PASSWORD` | MySQL database root user password. | `nil` |
| `MYSQL_USER` | MySQL database user to create during the first initialization. | `nil` |
| `MYSQL_PASSWORD` | Password for the MySQL database user to create during the first initialization. | `nil` |
| `MYSQL_DATABASE` | MySQL database to create during the first initialization. | `nil` |
| `MYSQL_MASTER_HOST` | Address for the MySQL master node. | `nil` |
| `MYSQL_MASTER_PORT_NUMBER` | Port number for the MySQL master node. | `3306` |
| `MYSQL_MASTER_ROOT_USER` | MySQL database root user of the master host. | `root` |
| `MYSQL_MASTER_ROOT_PASSWORD` | Password for the MySQL database root user of the the master host. | `nil` |
| `MYSQL_MASTER_DELAY` | MySQL database replication delay. | `0` |
| `MYSQL_REPLICATION_USER` | MySQL replication database user. | `nil` |
| `MYSQL_REPLICATION_PASSWORD` | Password for the MySQL replication database user. | `nil` |
| `MYSQL_PORT_NUMBER` | Port number to use for the MySQL Server service. | `nil` |
| `MYSQL_REPLICATION_MODE` | MySQL replication mode. | `nil` |
| `MYSQL_REPLICATION_SLAVE_DUMP` | Make a dump on master and update slave MySQL database | `false` |
| `MYSQL_EXTRA_FLAGS` | Extra flags to be passed to start the MySQL Server. | `nil` |
| `MYSQL_INIT_SLEEP_TIME` | Sleep time when waiting for MySQL init configuration operations to finish. | `nil` |
| `MYSQL_CHARACTER_SET` | MySQL collation to use. | `nil` |
| `MYSQL_COLLATE` | MySQL collation to use. | `nil` |
| `MYSQL_BIND_ADDRESS` | MySQL bind address. | `nil` |
| `MYSQL_SQL_MODE` | MySQL Server SQL modes to enable. | `nil` |
| `MYSQL_UPGRADE` | MySQL upgrade option. | `AUTO` |
| `MYSQL_IS_DEDICATED_SERVER` | Whether the MySQL Server will run on a dedicated node. | `nil` |
| `MYSQL_CLIENT_ENABLE_SSL` | Whether to force SSL for connections to the MySQL database. | `no` |
| `MYSQL_REPLICATION_USE_SSL` | Whether to force SSL for MySQL replication. | `$DB_CLIENT_ENABLE_SSL` |
| `MYSQL_CLIENT_SSL_CA_FILE` | Path to CA certificate to use for SSL connections to the MySQL database server. | `nil` |
| `MYSQL_CLIENT_SSL_CERT_FILE` | Path to client public key certificate to use for SSL connections to the MySQL database server. | `nil` |
| `MYSQL_CLIENT_SSL_KEY_FILE` | Path to client private key to use for SSL connections to the MySQL database server. | `nil` |
| `MYSQL_CLIENT_EXTRA_FLAGS` | Whether to force SSL connections with the "mysql" CLI tool. Useful for applications that rely on the CLI instead of APIs. | `no` |
| `MYSQL_STARTUP_WAIT_RETRIES` | Number of retries waiting for the database to be running. | `300` |
| `MYSQL_STARTUP_WAIT_SLEEP_TIME` | Sleep time between retries waiting for the database to be running. | `2` |
| `MYSQL_ENABLE_SLOW_QUERY` | Whether to enable slow query logs. | `0` |
| `MYSQL_LONG_QUERY_TIME` | How much time, in seconds, defines a slow query. | `10.0` |
#### Read-only environment variables