diff options
author | aszlig <aszlig@redmoonstudios.org> | 2013-07-14 01:47:40 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2013-07-14 05:23:46 +0200 |
commit | 916d39f5ce36964a5b62f20d4c5ae3d18cfdea51 (patch) | |
tree | b6f5d5fe7e16e5aaae9ad6612f9b6ed6e8226f52 /modules/services/databases/mysql.nix | |
parent | 8499959c4a79e129f5073b32bc550b65a68f2c35 (diff) | |
download | nixpkgs-916d39f5ce36964a5b62f20d4c5ae3d18cfdea51.tar nixpkgs-916d39f5ce36964a5b62f20d4c5ae3d18cfdea51.tar.gz nixpkgs-916d39f5ce36964a5b62f20d4c5ae3d18cfdea51.tar.bz2 nixpkgs-916d39f5ce36964a5b62f20d4c5ae3d18cfdea51.tar.lz nixpkgs-916d39f5ce36964a5b62f20d4c5ae3d18cfdea51.tar.xz nixpkgs-916d39f5ce36964a5b62f20d4c5ae3d18cfdea51.tar.zst nixpkgs-916d39f5ce36964a5b62f20d4c5ae3d18cfdea51.zip |
mysql/mysql55: Log to stderr instead of logfile.
This should integrate the logging more tightly into systemd, so for example "systemctl status mysql" actually gives an overview about what's actually going on. This removes the logError option attribute, so in case you still want to write into a logfile, I've introduced an option called extraOptions, so you can use something like: services.mysql*.extraOptions = '' log-error = /var/log/mysql_err.log ''; Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/services/databases/mysql.nix')
-rw-r--r-- | modules/services/databases/mysql.nix | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/modules/services/databases/mysql.nix b/modules/services/databases/mysql.nix index 7bf7a77aa85..ed9d03dc60f 100644 --- a/modules/services/databases/mysql.nix +++ b/modules/services/databases/mysql.nix @@ -12,7 +12,7 @@ let mysqldOptions = "--user=${cfg.user} --datadir=${cfg.dataDir} " + - "--log-error=${cfg.logError} --pid-file=${pidFile}"; + "--pid-file=${pidFile}"; myCnf = pkgs.writeText "my.cnf" '' @@ -26,6 +26,7 @@ let master-password = ${cfg.replication.masterPassword} master-port = ${toString cfg.replication.masterPort} ''} + ${cfg.extraOptions} ''; in @@ -67,16 +68,27 @@ in description = "Location where MySQL stores its table files"; }; - logError = mkOption { - default = "/var/log/mysql_err.log"; - description = "Location of the MySQL error logfile"; - }; - pidDir = mkOption { default = "/var/run/mysql"; description = "Location of the file which stores the PID of the MySQL server"; }; + extraOptions = mkOption { + default = ""; + example = '' + key_buffer_size = 6G + table_cache = 1600 + log-error = /var/log/mysql_err.log + ''; + description = '' + Provide extra options to the MySQL configuration file. + + Please note, that these options are added to the + <literal>[mysqld]</literal> section so you don't need to explicitly + state it again. + ''; + }; + initialDatabases = mkOption { default = []; description = "List of database names and their initial schemas that should be used to create databases on the first startup of MySQL"; |