From dd8e5db3bc7c717542eb867b6addde7ccc9003e2 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Thu, 18 Mar 2021 11:48:09 -0700 Subject: [PATCH] Improve error message clarity when MYSQL_USER="root" --- 5.6/docker-entrypoint.sh | 4 ++-- 5.7/docker-entrypoint.sh | 4 ++-- 8.0/docker-entrypoint.sh | 4 ++-- template/docker-entrypoint.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/5.6/docker-entrypoint.sh b/5.6/docker-entrypoint.sh index 461e34bac..62e6a876b 100755 --- a/5.6/docker-entrypoint.sh +++ b/5.6/docker-entrypoint.sh @@ -156,8 +156,8 @@ docker_verify_minimum_env() { # This will prevent the CREATE USER from failing (and thus exiting with a half-initialized database) if [ "$MYSQL_USER" = 'root' ]; then mysql_error <<-'EOF' - MYSQL_USER="root", MYSQL_PASSWORD cannot be used for the root user - Use one of the following to control the root user password: + MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user + Remove MYSQL_USER="root" and use one of the following to control the root user password: - MYSQL_ROOT_PASSWORD - MYSQL_ALLOW_EMPTY_PASSWORD - MYSQL_RANDOM_ROOT_PASSWORD diff --git a/5.7/docker-entrypoint.sh b/5.7/docker-entrypoint.sh index 461e34bac..62e6a876b 100755 --- a/5.7/docker-entrypoint.sh +++ b/5.7/docker-entrypoint.sh @@ -156,8 +156,8 @@ docker_verify_minimum_env() { # This will prevent the CREATE USER from failing (and thus exiting with a half-initialized database) if [ "$MYSQL_USER" = 'root' ]; then mysql_error <<-'EOF' - MYSQL_USER="root", MYSQL_PASSWORD cannot be used for the root user - Use one of the following to control the root user password: + MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user + Remove MYSQL_USER="root" and use one of the following to control the root user password: - MYSQL_ROOT_PASSWORD - MYSQL_ALLOW_EMPTY_PASSWORD - MYSQL_RANDOM_ROOT_PASSWORD diff --git a/8.0/docker-entrypoint.sh b/8.0/docker-entrypoint.sh index 461e34bac..62e6a876b 100755 --- a/8.0/docker-entrypoint.sh +++ b/8.0/docker-entrypoint.sh @@ -156,8 +156,8 @@ docker_verify_minimum_env() { # This will prevent the CREATE USER from failing (and thus exiting with a half-initialized database) if [ "$MYSQL_USER" = 'root' ]; then mysql_error <<-'EOF' - MYSQL_USER="root", MYSQL_PASSWORD cannot be used for the root user - Use one of the following to control the root user password: + MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user + Remove MYSQL_USER="root" and use one of the following to control the root user password: - MYSQL_ROOT_PASSWORD - MYSQL_ALLOW_EMPTY_PASSWORD - MYSQL_RANDOM_ROOT_PASSWORD diff --git a/template/docker-entrypoint.sh b/template/docker-entrypoint.sh index 461e34bac..62e6a876b 100755 --- a/template/docker-entrypoint.sh +++ b/template/docker-entrypoint.sh @@ -156,8 +156,8 @@ docker_verify_minimum_env() { # This will prevent the CREATE USER from failing (and thus exiting with a half-initialized database) if [ "$MYSQL_USER" = 'root' ]; then mysql_error <<-'EOF' - MYSQL_USER="root", MYSQL_PASSWORD cannot be used for the root user - Use one of the following to control the root user password: + MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user + Remove MYSQL_USER="root" and use one of the following to control the root user password: - MYSQL_ROOT_PASSWORD - MYSQL_ALLOW_EMPTY_PASSWORD - MYSQL_RANDOM_ROOT_PASSWORD