diff options
author | Christopher Baines <mail@cbaines.net> | 2016-12-11 21:17:40 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-12-14 00:22:49 +0100 |
commit | 4b41febf9c73d9d933b4873edadf9693ae4d5bb3 (patch) | |
tree | e3bec0d1131dec24cc1f61a09a0f005d7ad0a1d3 /gnu | |
parent | 3f1b4bc316e6c561e85692a1fb0ed511547f85d2 (diff) | |
download | guix-4b41febf9c73d9d933b4873edadf9693ae4d5bb3.tar.gz |
services: mysql: Add port to configuration
* gnu/services/databases.scm (<mysql-configuration>): Add port field. (mysql-configuration-file): Use the port field when creating the configuration file. * doc/guix.texi (Database Services): Document it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/services/databases.scm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index 1eed85542b..f7e08e6967 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -160,7 +160,8 @@ and stores the database cluster in @var{data-directory}." (define-record-type* <mysql-configuration> mysql-configuration make-mysql-configuration mysql-configuration? - (mysql mysql-configuration-mysql (default mariadb))) + (mysql mysql-configuration-mysql (default mariadb)) + (port mysql-configuration-port (default 3306))) (define %mysql-accounts (list (user-group @@ -175,10 +176,11 @@ and stores the database cluster in @var{data-directory}." (define mysql-configuration-file (match-lambda - (($ <mysql-configuration> mysql) - (plain-file "my.cnf" "[mysqld] + (($ <mysql-configuration> mysql port) + (mixed-text-file "my.cnf" "[mysqld] datadir=/var/lib/mysql socket=/run/mysqld/mysqld.sock +port=" (number->string port) " ")))) (define (%mysql-activation config) |