mysql service: change default data directory for 17.09
The new directory is now moved to /var/lib/mysql. This makes it consistent with with upstream.
This commit is contained in:
parent
9f6b1dca58
commit
f469bd83bb
@ -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