diff --git a/root-common/usr/share/container-scripts/mysql/helpers.sh b/root-common/usr/share/container-scripts/mysql/helpers.sh index 4e832fcd..2dee842b 100644 --- a/root-common/usr/share/container-scripts/mysql/helpers.sh +++ b/root-common/usr/share/container-scripts/mysql/helpers.sh @@ -7,6 +7,14 @@ function log_and_run { "$@" } +function log_debug { + CONTAINER_DEBUG=${CONTAINER_DEBUG:-} + if [[ "${CONTAINER_DEBUG,,}" != "true" ]]; then + return + fi + log_info $@ +} + function log_volume_info { CONTAINER_DEBUG=${CONTAINER_DEBUG:-} if [[ "${CONTAINER_DEBUG,,}" != "true" ]]; then diff --git a/root-common/usr/share/container-scripts/mysql/init/50-passwd-change.sh b/root-common/usr/share/container-scripts/mysql/init/50-passwd-change.sh index 2514f2dc..be64b4f4 100644 --- a/root-common/usr/share/container-scripts/mysql/init/50-passwd-change.sh +++ b/root-common/usr/share/container-scripts/mysql/init/50-passwd-change.sh @@ -4,9 +4,11 @@ password_change() { # Set the password for MySQL user and root everytime this container is started. # This allows to change the password by editing the deployment configuration. if [[ -v MYSQL_USER && -v MYSQL_PASSWORD ]]; then + log_debug "About to change password for user '${MYSQL_USER}'." mysql $mysql_flags < "5.6" ] ; then mysql $mysql_flags < "5.6" ] ; then @@ -38,11 +41,15 @@ mysql $mysql_flags <