aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-05-20 17:22:28 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-20 17:22:28 +0100
commit02ea7eac3174826c62a5c24caf6d54c45cf91e04 (patch)
tree883ab8b554eccaeddc8ec4a0bcdf9cabf0e879fb
parent89f8c2ac38045801564742030b6c000b23f6a6f0 (diff)
downloadguix-02ea7eac3174826c62a5c24caf6d54c45cf91e04.tar
guix-02ea7eac3174826c62a5c24caf6d54c45cf91e04.tar.gz
Use a pid file in the mysql servicemysql-use-pid-file
-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 8ae248ebe4..d8fde9d02d 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -442,7 +442,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) "
"))))
@@ -458,7 +458,7 @@ port=" (number->string port) "
(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)
@@ -509,8 +509,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