From: Christopher Baines <mail@cbaines.net>
To: guix-devel@gnu.org
Subject: [PATCH] services: mysql: Add port to configuration
Date: Sun, 11 Dec 2016 21:17:40 +0000 [thread overview]
Message-ID: <20161211211740.30281-1-mail@cbaines.net> (raw)
* gnu/services/databases.scm (<mysql-configuration>): Add port field.
(mysql-configuration-file): Use the port field when creating the
configuration file.
---
gnu/services/databases.scm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 1eed85542..f7e08e696 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)
--
2.11.0
next reply other threads:[~2016-12-11 21:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-11 21:17 Christopher Baines [this message]
2016-12-13 22:55 ` [PATCH] services: mysql: Add port to configuration Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161211211740.30281-1-mail@cbaines.net \
--to=mail@cbaines.net \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).