[bitnami/suitecrm] SQL syntax error in mysql init script (#30005)

MySQL v8 throws a SQL syntax error when $password is surrounded by
double quotes.

Signed-off-by: Sett Wai <sett@wethinkcode.co.za>
This commit is contained in:
Sett 2023-04-18 11:13:02 +02:00 committed by GitHub
parent 01ee958d6a
commit 9503a1c345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -580,9 +580,9 @@ mysql_ensure_user_exists() {
auth_string="identified via pam using '$DB_FLAVOR'"
elif [[ -n "$password" ]]; then
if [[ -n "$auth_plugin" ]]; then
auth_string="identified with $auth_plugin by \"$password\""
auth_string="identified with $auth_plugin by '$password'"
else
auth_string="identified by \"$password\""
auth_string="identified by '$password'"
fi
fi
debug "creating database user \'$user\'"

View File

@ -586,9 +586,9 @@ mysql_ensure_user_exists() {
auth_string="identified via pam using '$DB_FLAVOR'"
elif [[ -n "$password" ]]; then
if [[ -n "$auth_plugin" ]]; then
auth_string="identified with $auth_plugin by \"$password\""
auth_string="identified with $auth_plugin by '$password'"
else
auth_string="identified by \"$password\""
auth_string="identified by '$password'"
fi
fi
debug "creating database user \'$user\'"