nixos/mysql: fix option ensureDatabases
The database name needs to be quoted in case it contains special characters so the MySQL service does not fail to start.
This commit is contained in:
parent
2dbaab7afe
commit
429c0bf60c
@ -362,7 +362,7 @@ in
|
||||
${optionalString (cfg.ensureDatabases != []) ''
|
||||
(
|
||||
${concatMapStrings (database: ''
|
||||
echo "CREATE DATABASE IF NOT EXISTS ${database};"
|
||||
echo "CREATE DATABASE IF NOT EXISTS \`${database}\`;"
|
||||
'') cfg.ensureDatabases}
|
||||
) | ${mysql}/bin/mysql -u root -N
|
||||
''}
|
||||
|
Loading…
Reference in New Issue
Block a user