aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-05-20 17:22:28 +0100
committerChristopher Baines <christopher.baines@digital.cabinet-office.gov.uk>2019-05-20 10:22:21 +0100
commit9d8c0857560d8a4994297d53cd3d492ab118cb98 (patch)
tree997c3cddad0b94fba379a415822b9e67d41ee3d0
parentfd52b49bc6b30165d20758f8780ec777ba9fe57d (diff)
downloadgnu-guix-9d8c0857560d8a4994297d53cd3d492ab118cb98.tar
gnu-guix-9d8c0857560d8a4994297d53cd3d492ab118cb98.tar.gz
Use a pid file in the mysql service
-rw-r--r--gnu/services/databases.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index c98b364211..131b07d359 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -654,7 +654,7 @@ storage:
(($ <mysql-configuration> mysql port)
(mixed-text-file "my.cnf" "[mysqld]
datadir=/var/lib/mysql
-socket=/run/mysqld/mysqld.sock
+socket=/var/run/mysql/mysqld.sock
port=" (number->string port) "
max_allowed_packet=16M
"))))
@@ -671,7 +671,7 @@ max_allowed_packet=16M
(uid (passwd:uid user))
(gid (passwd:gid user))
(datadir "/var/lib/mysql")
- (rundir "/run/mysqld"))
+ (rundir "/var/run/mysql"))
(mkdir-p datadir)
(chown datadir uid gid)
(mkdir-p rundir)
@@ -722,8 +722,11 @@ FLUSH PRIVILEGES;
(my.cnf (mysql-configuration-file config)))
#~(make-forkexec-constructor
(list (string-append #$mysql "/bin/mysqld")
- (string-append "--defaults-file=" #$my.cnf))
- #:user "mysql" #:group "mysql")))
+ (string-append "--defaults-file=" #$my.cnf)
+ "--pid-file=/var/run/mysql/pid")
+ #:user "mysql"
+ #:group "mysql"
+ #:pid-file "/var/run/mysql/pid")))
(stop #~(make-kill-destructor)))))
(define mysql-service-type