Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
nixos/mysql: fix option ensureDatabases
Browse files Browse the repository at this point in the history
The database name needs to be quoted
in case it contains special characters
so the MySQL service does not fail to start.
  • Loading branch information
dermetfan committed Jan 17, 2019
1 parent 2dbaab7 commit 429c0bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/services/databases/mysql.nix
Expand Up @@ -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
''}
Expand Down

0 comments on commit 429c0bf

Please sign in to comment.