diff options
author | Robin Stumm <serverkorken@gmail.com> | 2019-01-17 18:59:32 +0100 |
---|---|---|
committer | Robin Stumm <serverkorken@gmail.com> | 2019-01-17 19:08:50 +0100 |
commit | 429c0bf60cc6aba6e80b4528215a9494bdfaf2c3 (patch) | |
tree | 5ddeb2537506496f0d26ed6f3373808683e978e1 | |
parent | 2dbaab7afe1cd796fc4dbe3383207f2be5060b75 (diff) | |
download | nixlib-429c0bf60cc6aba6e80b4528215a9494bdfaf2c3.tar nixlib-429c0bf60cc6aba6e80b4528215a9494bdfaf2c3.tar.gz nixlib-429c0bf60cc6aba6e80b4528215a9494bdfaf2c3.tar.bz2 nixlib-429c0bf60cc6aba6e80b4528215a9494bdfaf2c3.tar.lz nixlib-429c0bf60cc6aba6e80b4528215a9494bdfaf2c3.tar.xz nixlib-429c0bf60cc6aba6e80b4528215a9494bdfaf2c3.tar.zst nixlib-429c0bf60cc6aba6e80b4528215a9494bdfaf2c3.zip |
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.
-rw-r--r-- | nixos/modules/services/databases/mysql.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index df6f3876585e..1ba878957ed9 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -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 ''} |