Re: daemontools and mysqld
Brian Reichert <[email protected]> Thu, 14 Sep 2006 21:38:29 -0400
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Sep 14, 2006 at 08:13:21PM -0300, Mariano Absatz wrote: > On 9/7/06, Cees De Groot <[email protected]> wrote: > >If there's no command line option, take a peek at > >http://www.openafs.org/pipermail/openafs-info/2002-February/003409.html > >- it helped me in taming various daemons with daemontools :-) > Well... it seems mysqld doesn't allow you to run in the foreground :-( I could have sworn I just had this conversation with someone else. Here's a run file for 5.1.6-alpha, controllable with daemontools. This is for mysql 5.1.6-alpha, build form the FreeBSD ports system, but it seems to be behaving for me as expected: Watching logs with: # tail -F /var/log/mysqld/current | tai64nlocal Start: # svc -u /service/mysql/ yeilds: 2006-09-15 09:46:41.591944500 060915 9:46:41 InnoDB: Started; log sequence number 0 43655 2006-09-15 09:46:41.599746500 060915 9:46:41 [Note] /usr/local/libexec/mysqld: ready for connections. 2006-09-15 09:46:41.599749500 Version: '5.1.6-alpha' socket: '/tmp/mysql.sock' port: 3306 FreeBSD port: mysql-server-5.1.6_2 Stop: # svc -d /service/mysql/ yeilds: 2006-09-15 09:48:29.130446500 2006-09-15 09:48:29.131075500 060915 9:48:29 InnoDB: Starting shutdown... 2006-09-15 09:48:31.941055500 060915 9:48:31 InnoDB: Shutdown completed; log sequence number 0 43655 2006-09-15 09:48:31.941807500 060915 9:48:31 [Note] /usr/local/libexec/mysqld: Shutdown complete 2006-09-15 09:48:31.941810500 My run file: #!/bin/sh -u # remap STDERR to STDOUT, so all errors will show up in the logs exec 2>&1 exec \ /usr/local/bin/setuidgid mysql \ /usr/local/libexec/mysqld \ --defaults-extra-file=/var/db/mysql/my.cnf \ --basedir=/usr/local \ --datadir=/var/db/mysql --pid-file=/var/db/mysql/mysql.pid I missed the OP; what was the problem people were seeing? > -- > Mariano Absatz - El Baby > el (dot) baby (AT) gmail (dot) com > el (punto) baby (ARROBA:@) gmail (punto) com -- Brian Reichert <[email protected]> 55 Crystal Ave. #286 Daytime number: (603) 434-6842 Derry NH 03038-1725 USA BSD admin/developer at large