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> | 2018-12-04 20:28:00 +0000 |
commit | 8b1c7bf63556daee7a273133a0fb9bf006c44ef0 (patch) | |
tree | 8ca66fa620b0a955f0f695d23ce917e665370806 /gnu/services | |
parent | a7ff0bf51b16ddd2ea2ab277bef5b2263fff854d (diff) | |
download | gnu-guix-8b1c7bf63556daee7a273133a0fb9bf006c44ef0.tar gnu-guix-8b1c7bf63556daee7a273133a0fb9bf006c44ef0.tar.gz |
Use a pid file in the mysql service
Diffstat (limited to 'gnu/services')
-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 10c7f7e671..ab63019f77 100644 --- a/gnu/services/databases.scm +++ b/gnu/services/databases.scm @@ -556,7 +556,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 ")))) @@ -573,7 +573,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) @@ -624,8 +624,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 |