Do not create Zabbix user if root user is not specified for MySQL

This commit is contained in:
Alexey Pustovalov 2019-11-05 15:32:23 +02:00
parent 1b86155696
commit 697c3b1915
6 changed files with 6 additions and 6 deletions

View File

@ -159,7 +159,7 @@ check_variables_mysql() {
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi
[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true
[ -n "${MYSQL_USER}" ] && [ "${USE_DB_ROOT_USER}" == "true" ] && CREATE_ZBX_DB_USER=true
# If root password is not specified use provided credentials
DB_SERVER_ROOT_USER=${DB_SERVER_ROOT_USER:-${MYSQL_USER}}

View File

@ -267,7 +267,7 @@ check_variables_mysql() {
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi
[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true
[ -n "${MYSQL_USER}" ] && [ "${USE_DB_ROOT_USER}" == "true" ] && CREATE_ZBX_DB_USER=true
# If root password is not specified use provided credentials
DB_SERVER_ROOT_USER=${DB_SERVER_ROOT_USER:-${MYSQL_USER}}

View File

@ -267,7 +267,7 @@ check_variables_mysql() {
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi
[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true
[ -n "${MYSQL_USER}" ] && [ "${USE_DB_ROOT_USER}" == "true" ] && CREATE_ZBX_DB_USER=true
# If root password is not specified use provided credentials
DB_SERVER_ROOT_USER=${DB_SERVER_ROOT_USER:-${MYSQL_USER}}

View File

@ -212,7 +212,7 @@ check_variables_mysql() {
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi
[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true
[ -n "${MYSQL_USER}" ] && [ "${USE_DB_ROOT_USER}" == "true" ] && CREATE_ZBX_DB_USER=true
# If root password is not specified use provided credentials
: ${DB_SERVER_ROOT_USER:=${MYSQL_USER}}

View File

@ -267,7 +267,7 @@ check_variables_mysql() {
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi
[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true
[ -n "${MYSQL_USER}" ] && [ "${USE_DB_ROOT_USER}" == "true" ] && CREATE_ZBX_DB_USER=true
# If root password is not specified use provided credentials
DB_SERVER_ROOT_USER=${DB_SERVER_ROOT_USER:-${MYSQL_USER}}

View File

@ -267,7 +267,7 @@ check_variables_mysql() {
DB_SERVER_ROOT_PASS=${MYSQL_ROOT_PASSWORD:-""}
fi
[ -n "${MYSQL_USER}" ] && CREATE_ZBX_DB_USER=true
[ -n "${MYSQL_USER}" ] && [ "${USE_DB_ROOT_USER}" == "true" ] && CREATE_ZBX_DB_USER=true
# If root password is not specified use provided credentials
DB_SERVER_ROOT_USER=${DB_SERVER_ROOT_USER:-${MYSQL_USER}}