Hi,
In message<4EC3531E.5000903%fastmail.fm@localhost>
on Wed, 16 Nov 2011 01:07:26 -0500,
David Howland<metalliqaz%fastmail.fm@localhost> wrote:
with mysqld=YES in my rc.conf, the boot messages shows "Starting
mysqld." but the daemon doesn't actually start. When I log in, it is
not running, however "/etc/rc.d/mysqld start" starts the daemon just
fine and it works. I never get any error messages. Has anyone seen
this before? I have no way to debug without seeing some kind of
failure.
I might report this problem before or I forgot to fill PR about this
problem. Anyway, redirecting mysqld's stdout to some where would
solve the problem. (mysqld is poorly daemonize, it dosen't properly
detach controlling terminal.)
mysqld process will be terminate when it start from system start up
time. Because, it trying to output some message but at that time
stdout isn't available any more.
When you start manually from command line, stdout is available at
least until it output something.
Below change would be solve this problem. (It redirecting to file for
debugging purpose, it is OK to /dev/null.)
--- usr/pkg/share/examples/rc.d/mysqld 2011-10-24 12:00:47.000000000 +0900
+++ etc/rc.d/mysqld 2011-09-24 12:32:46.000000000 +0900
@@ -75,7 +75,7 @@
cd /usr/pkg
${command} --user=${mysqld_user} --datadir=${mysqld_datadir} \
--pid-file=${pidfile} ${mysqld_flags} \
- ${thread_flags}&
+ ${thread_flags}>/var/tmp/mysqld.stdout
2>/var/tmp/mysqld.stderr&
}
if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
Ideally, mysqld should be fixed.
Best regards.