mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
services: MySQL: Make the socket configurable.
* gnu/services/databases.scm (<mysql-configuration>): Add SOCKET field. (mysql-configuration-file): Adjust accordingly. * doc/guix.texi (Database Services): Likewise.
This commit is contained in:
parent
27d7cdbf87
commit
927bf98e0e
2 changed files with 6 additions and 2 deletions
|
@ -19145,6 +19145,9 @@ to bind to all available network interfaces.
|
||||||
@item @code{port} (default: @code{3306})
|
@item @code{port} (default: @code{3306})
|
||||||
TCP port on which the database server listens for incoming connections.
|
TCP port on which the database server listens for incoming connections.
|
||||||
|
|
||||||
|
@item @code{socket} (default: @code{"/run/mysqld/mysqld.sock"})
|
||||||
|
Socket file to use for local (non-network) connections.
|
||||||
|
|
||||||
@item @code{extra-content} (default: @code{""})
|
@item @code{extra-content} (default: @code{""})
|
||||||
Additional settings for the @file{my.cnf} configuration file.
|
Additional settings for the @file{my.cnf} configuration file.
|
||||||
|
|
||||||
|
|
|
@ -467,6 +467,7 @@ (define-record-type* <mysql-configuration>
|
||||||
(mysql mysql-configuration-mysql (default mariadb))
|
(mysql mysql-configuration-mysql (default mariadb))
|
||||||
(bind-address mysql-configuration-bind-address (default "127.0.0.1"))
|
(bind-address mysql-configuration-bind-address (default "127.0.0.1"))
|
||||||
(port mysql-configuration-port (default 3306))
|
(port mysql-configuration-port (default 3306))
|
||||||
|
(socket mysql-configuration-socket (default "/run/mysqld/mysqld.sock"))
|
||||||
(extra-content mysql-configuration-extra-content (default "")))
|
(extra-content mysql-configuration-extra-content (default "")))
|
||||||
|
|
||||||
(define %mysql-accounts
|
(define %mysql-accounts
|
||||||
|
@ -482,10 +483,10 @@ (define %mysql-accounts
|
||||||
|
|
||||||
(define mysql-configuration-file
|
(define mysql-configuration-file
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <mysql-configuration> mysql bind-address port extra-content)
|
(($ <mysql-configuration> mysql bind-address port socket extra-content)
|
||||||
(mixed-text-file "my.cnf" "[mysqld]
|
(mixed-text-file "my.cnf" "[mysqld]
|
||||||
datadir=/var/lib/mysql
|
datadir=/var/lib/mysql
|
||||||
socket=/run/mysqld/mysqld.sock
|
socket=" socket "
|
||||||
bind-address=" bind-address "
|
bind-address=" bind-address "
|
||||||
port=" (number->string port) "
|
port=" (number->string port) "
|
||||||
" extra-content "
|
" extra-content "
|
||||||
|
|
Loading…
Reference in a new issue