From 27d7cdbf87e7a4520f93ee3914139215abf94e68 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 28 Nov 2020 01:46:22 +0100 Subject: services: MySQL: Bind to localhost only by default. * gnu/services/databases.scm (): Add BIND-ADDRESS field. (mysql-configuration-file): Adjust accordingly. * doc/guix.texi (Database Services): Document it. --- gnu/services/databases.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index bb0a0c28f2..8fd87a563d 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -465,6 +465,7 @@ storage: mysql-configuration make-mysql-configuration mysql-configuration? (mysql mysql-configuration-mysql (default mariadb)) + (bind-address mysql-configuration-bind-address (default "127.0.0.1")) (port mysql-configuration-port (default 3306)) (extra-content mysql-configuration-extra-content (default ""))) @@ -481,10 +482,11 @@ storage: (define mysql-configuration-file (match-lambda - (($ mysql port extra-content) + (($ mysql bind-address port extra-content) (mixed-text-file "my.cnf" "[mysqld] datadir=/var/lib/mysql socket=/run/mysqld/mysqld.sock +bind-address=" bind-address " port=" (number->string port) " " extra-content " ")))) -- cgit v1.2.3