diff --git a/bitnami/mysql/5.7/debian-11/Dockerfile b/bitnami/mysql/5.7/debian-11/Dockerfile index a754b665e908..56df76a9f589 100644 --- a/bitnami/mysql/5.7/debian-11/Dockerfile +++ b/bitnami/mysql/5.7/debian-11/Dockerfile @@ -2,12 +2,11 @@ FROM docker.io/bitnami/minideb:bullseye ARG TARGETARCH -LABEL com.vmware.cp.artifact.flavor="sha256:109c7d51bd69bb6b3df71017440c1ea0699454f81fe188056c083f0b57c96ea6" \ - org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ - org.opencontainers.image.created="2023-05-02T14:10:52Z" \ +LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ + org.opencontainers.image.created="2023-05-05T14:35:43Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="5.7.42-debian-11-r5" \ + org.opencontainers.image.ref.name="5.7.42-debian-11-r6" \ org.opencontainers.image.title="mysql" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="5.7.42" diff --git a/bitnami/mysql/5.7/debian-11/prebuildfs/opt/bitnami/scripts/libos.sh b/bitnami/mysql/5.7/debian-11/prebuildfs/opt/bitnami/scripts/libos.sh index e573899abacb..02c989d693ae 100644 --- a/bitnami/mysql/5.7/debian-11/prebuildfs/opt/bitnami/scripts/libos.sh +++ b/bitnami/mysql/5.7/debian-11/prebuildfs/opt/bitnami/scripts/libos.sh @@ -412,11 +412,16 @@ generate_random_string() { ascii) filter="[:print:]" ;; + numeric) + filter="0-9" + ;; alphanumeric) filter="a-zA-Z0-9" ;; - numeric) - filter="0-9" + alphanumeric+special|special+alphanumeric) + # Limit variety of special characters, so there is a higher chance of containing more alphanumeric characters + # Special characters are harder to write, and it could impact the overall UX if most passwords are too complex + filter='a-zA-Z0-9!@#$%^' ;; *) echo "Invalid type ${type}" >&2 @@ -647,4 +652,4 @@ run_chroot() { else chroot --userspec="$userspec" / bash -c "cd ${cwd}; export HOME=${homedir}; exec \"\$@\"" -- "$@" fi -} \ No newline at end of file +} diff --git a/bitnami/mysql/5.7/debian-11/rootfs/opt/bitnami/scripts/libmysql.sh b/bitnami/mysql/5.7/debian-11/rootfs/opt/bitnami/scripts/libmysql.sh index edda878ab664..fe290f338235 100644 --- a/bitnami/mysql/5.7/debian-11/rootfs/opt/bitnami/scripts/libmysql.sh +++ b/bitnami/mysql/5.7/debian-11/rootfs/opt/bitnami/scripts/libmysql.sh @@ -200,6 +200,7 @@ 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; EOF elif [[ "$DB_REPLICATION_MODE" = "master" ]]; then diff --git a/bitnami/mysql/5.7/debian-11/rootfs/opt/bitnami/scripts/mysql-env.sh b/bitnami/mysql/5.7/debian-11/rootfs/opt/bitnami/scripts/mysql-env.sh index 453c05abb842..8fd349cc7f1a 100644 --- a/bitnami/mysql/5.7/debian-11/rootfs/opt/bitnami/scripts/mysql-env.sh +++ b/bitnami/mysql/5.7/debian-11/rootfs/opt/bitnami/scripts/mysql-env.sh @@ -33,6 +33,7 @@ mysql_env_vars=( MYSQL_MASTER_PORT_NUMBER MYSQL_MASTER_ROOT_USER MYSQL_MASTER_ROOT_PASSWORD + MYSQL_MASTER_DELAY MYSQL_REPLICATION_USER MYSQL_REPLICATION_PASSWORD MYSQL_PORT_NUMBER @@ -120,6 +121,8 @@ export MYSQL_MASTER_ROOT_USER="${MYSQL_MASTER_ROOT_USER:-root}" export DB_MASTER_ROOT_USER="$MYSQL_MASTER_ROOT_USER" # only used during the first initialization export MYSQL_MASTER_ROOT_PASSWORD="${MYSQL_MASTER_ROOT_PASSWORD:-}" export DB_MASTER_ROOT_PASSWORD="$MYSQL_MASTER_ROOT_PASSWORD" # only used during the first initialization +export MYSQL_MASTER_DELAY="${MYSQL_MASTER_DELAY:-0}" +export DB_MASTER_DELAY="$MYSQL_MASTER_DELAY" # only used during the first initialization export MYSQL_REPLICATION_USER="${MYSQL_REPLICATION_USER:-}" export DB_REPLICATION_USER="$MYSQL_REPLICATION_USER" # only used during the first initialization export MYSQL_REPLICATION_PASSWORD="${MYSQL_REPLICATION_PASSWORD:-}" diff --git a/bitnami/mysql/README.md b/bitnami/mysql/README.md index dd2037070d95..540c92fe7347 100644 --- a/bitnami/mysql/README.md +++ b/bitnami/mysql/README.md @@ -302,6 +302,7 @@ A **zero downtime** MySQL master-slave [replication](https://dev.mysql.com/doc/r * `MYSQL_MASTER_PORT_NUMBER`: Server port of the replication master (slave parameter). Defaults to `3306`. * `MYSQL_MASTER_ROOT_USER`: User on replication master with access to `MYSQL_DATABASE` (slave parameter). Defaults to `root` * `MYSQL_MASTER_ROOT_PASSWORD`: Password of user on replication master with access to `MYSQL_DATABASE` (slave parameter). No defaults. +* `MYSQL_MASTER_DELAY`: The database replication delay (slave parameter). Defaults to `0`. In a replication cluster you can have one master and zero or more slaves. When replication is enabled the master node is in read-write mode, while the slaves are in read-only mode. For best performance its advisable to limit the reads to the slaves.