pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mysql-server-5.5.16nb1 fails to start daemon at boot

Well done my friend! That fixed it up. It would have taken me quite some time to figure that one out.

Thank you.


On 11/16/2011 1:52 AM, Takahiro Kambe wrote:

In message<>
        on Wed, 16 Nov 2011 01:07:26 -0500,
        David Howland<>  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
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 

  if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then

Ideally, mysqld should be fixed.

Best regards.

Home | Main Index | Thread Index | Old Index