diff options
Diffstat (limited to 'nixos/modules/services/databases/mysql.nix')
-rw-r--r-- | nixos/modules/services/databases/mysql.nix | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index 97e58fd228f45..66d55b650a450 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -18,16 +18,12 @@ let in (pName mysql == pName pkgs.mysql57) && ((builtins.compareVersions mysql.version "5.7") >= 0); - pidFile = "${cfg.pidDir}/mysqld.pid"; - - mysqldAndInstallOptions = - "--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${mysql}"; mysqldOptions = - "${mysqldAndInstallOptions} --pid-file=${pidFile}"; + "--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${mysql}"; # For MySQL 5.7+, --insecure creates the root user without password # (earlier versions and MariaDB do this by default). installOptions = - "${mysqldAndInstallOptions} ${lib.optionalString isMysqlAtLeast57 "--insecure"}"; + "${mysqldOptions} ${lib.optionalString isMysqlAtLeast57 "--insecure"}"; in @@ -80,11 +76,6 @@ in description = "Location where MySQL stores its table files"; }; - pidDir = mkOption { - default = "/run/mysqld"; - description = "Location of the file which stores the PID of the MySQL server"; - }; - extraOptions = mkOption { type = types.lines; default = ""; @@ -298,7 +289,6 @@ in systemd.tmpfiles.rules = [ "d '${cfg.dataDir}' 0700 ${cfg.user} mysql -" - "d '${cfg.pidDir}' 0755 ${cfg.user} mysql -" ]; systemd.services.mysql = let @@ -329,7 +319,6 @@ in User = cfg.user; Group = "mysql"; Type = if hasNotify then "notify" else "simple"; - # /run/mysqld needs to be created in addition to pidDir, as they could point to different locations RuntimeDirectory = "mysqld"; RuntimeDirectoryMode = "0755"; # The last two environment variables are used for starting Galera clusters |