diff options
author | Christopher Baines <mail@cbaines.net> | 2018-05-20 17:22:28 +0100 |
---|---|---|
committer | Christopher Baines <christopher.baines@digital.cabinet-office.gov.uk> | 2019-02-24 20:34:02 +0000 |
commit | bd6dca75ef72c2e880c5eeec5727c0f60c63ed7f (patch) | |
tree | 4ba07427a5fb06607b3f679613476c4479aa1743 | |
parent | f719366fca9c9f84c5966b56cce8eef0c5c2215a (diff) | |
download | gnu-guix-bd6dca75ef72c2e880c5eeec5727c0f60c63ed7f.tar gnu-guix-bd6dca75ef72c2e880c5eeec5727c0f60c63ed7f.tar.gz |
Use a pid file in the mysql service
-rw-r--r-- | gnu/services/databases.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm index 0f8bef5d3e..b8f94726ef 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -587,7 +587,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 ")))) @@ -604,7 +604,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) @@ -655,8 +655,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 |