mysql module: add option to bind to an address
This commit is contained in:
parent
4010313ab9
commit
d847b5c763
|
@ -20,6 +20,7 @@ let
|
||||||
''
|
''
|
||||||
[mysqld]
|
[mysqld]
|
||||||
port = ${toString cfg.port}
|
port = ${toString cfg.port}
|
||||||
|
${optionalString (cfg.bind != null) "bind-address = ${cfg.bind}" }
|
||||||
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "log-bin=mysql-bin"}
|
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "log-bin=mysql-bin"}
|
||||||
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "server-id = ${toString cfg.replication.serverId}"}
|
${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "server-id = ${toString cfg.replication.serverId}"}
|
||||||
${optionalString (cfg.replication.role == "slave" && !atLeast55)
|
${optionalString (cfg.replication.role == "slave" && !atLeast55)
|
||||||
|
@ -58,6 +59,13 @@ in
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bind = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
example = literalExample "0.0.0.0";
|
||||||
|
description = "Address to bind to. The default it to bind to all addresses";
|
||||||
|
};
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 3306;
|
default = 3306;
|
||||||
|
|
Loading…
Reference in a new issue