Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Sep 2005 15:19:22 -0400
From:      Gerard Seibert <gerard-seibert@suscom.net>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re[2]: Restarting MySQL from CRON
Message-ID:  <20050910151703.F4C1.GERARD-SEIBERT@suscom.net>
In-Reply-To: <20050910181557.GK84582@dan.emsphone.com>
References:  <20050910140047.81C2.GERARD-SEIBERT@suscom.net> <20050910181557.GK84582@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 10 Sep 2005 13:15:57 -0500, Dan Nelson <dnelson@allantgroup.com>
Replied to: Re: Restarting MySQL from CRON
With these words of wisdom:

> In the last episode (Sep 10), Gerard Seibert said:
> > =1EOn Saturday, September 10, 2005 12:27:02 PM Dan Nelson <dnelson@al=
lantgroup.com> wrote:
> > > In the last episode (Sep 10), Gerard Seibert said:
> > > > From time to time, I have found that MySQL has ceased to run. I
> > > > have a mailing program that requires that MySQL be running in
> > > > order for it to operate.
> > > >=20
> > > > Since I cannot seem to track down why it occasionally stops
> > > > functioning, and since the program that depends on it is started
> > > > via CRON, would it be advisable to put an entry into the CRON
> > > > that would restart MYSQL prior to the other program running.
> > > >=20
> > > > I was thinking of using this:
> > > >=20
> > > > 0  0  *  *  * /usr/local/etc/rc.d/mysql-server.sh restart
> > > >=20
> > > > Would that work, or is there a better way?
> > >=20
> > > "start" is better than "restart", since that won't cause an
> > > existing mysqld to exit.  But the startup script runs a script
> > > called mysqld_safe, which automatically restarts mysqld if it
> > > crashes anyway.  You might want to check your mysql .err log; maybe
> > > someone with the SHUTDOWN privilege is doing a clean shutdown.
> >=20
> > It definitely does not restart automatically. In addition, I am the
> > only user with root access. I doubt that anyone is shutting it down,
> > even by mistake.
> >=20
> > Where do I find this mysql error file? I cannot seem to locate it.
>=20
> /var/db/mysql/*.err
>=20
> If you see "Normal Shutdown"/"Shutdown complete"/"mysqld ended", that's
> a clean shutdown initiated by either a client connection or a signal
> (SIGTERM for example).  Crashes should have a "mysqld got signal ##", a
> bunch of debugging info, and a "mysqld restarted" line.  You're
> obviously not seeing that last line :)
>=20
> --=20
> 	Dan Nelson
> 	dnelson@allantgroup.com

********** REPLY SEPARATOR **********
On 9/10/2005 3:17:03 PM Gerard Seibert Replied:

Thanks, I will look into that.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050910151703.F4C1.GERARD-SEIBERT>