mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 21:14:52 +00:00
Merge pull request #25931 from bachp/mysql-17.09
mysql service: change default data directory for 17.09
This commit is contained in:
commit
fde29b2b06
@ -72,7 +72,7 @@ in
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/mysql"; # !!! should be /var/db/mysql
|
||||
example = "/var/lib/mysql";
|
||||
description = "Location where MySQL stores its table files";
|
||||
};
|
||||
|
||||
@ -166,6 +166,10 @@ in
|
||||
|
||||
config = mkIf config.services.mysql.enable {
|
||||
|
||||
services.mysql.dataDir =
|
||||
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/mysql"
|
||||
else "/var/mysql");
|
||||
|
||||
users.extraUsers.mysql = {
|
||||
description = "MySQL server user";
|
||||
group = "mysql";
|
||||
|
Loading…
Reference in New Issue
Block a user