Date: Thu, 3 Feb 2000 03:05:03 -0500 From: Kenn Martin <kmartin@infoteam.com> To: freebsd-isp@FreeBSD.ORG Subject: Re: controlling local boot sequence Message-ID: <20000203030503.A10082@infoteam.com> In-Reply-To: <20000202122914.A13278@numachi.com>; from reichert@numachi.com on Wed, Feb 02, 2000 at 12:29:14PM -0500 References: <20000201175018.A21189@infoteam.com> <20000201194931.B3152@numachi.com> <20000201223115.A24239@infoteam.com> <20000202122914.A13278@numachi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 02, 2000 at 12:29:14PM -0500, Brian Reichert wrote:
> On Tue, Feb 01, 2000 at 10:31:15PM -0500, Kenn Martin wrote:
> > OK. Looking into this, but I just need to figure out which MySQL
> > file(s) to run lsof against. It seems that most aren't open right
> > after startup :-( But anyway, I think that I am getting closer to
> > a better solution.
>
> I use either to the socket ( '/tmp/mysql.sock' ) or the network
> port ( 'TCP:3306' ), as per your local install. I suppose the
> socket is best, as MySQL can be started w/o a netwotk connection...
Well, for anyone that is interested, using netstat to check for the
socket appears to work very reliably. Here is my new mysql-server
startup script. I have it echo the dot in the loop just so I can
visually see what is happening on the console. It always echoes
one or two dots (depending on the system).
kmartin@alydar$ cat /usr/local/etc/rc.d/340.mysql-server.sh
#!/bin/sh
if [ -x /usr/local/bin/safe_mysqld ]
then
/usr/local/bin/safe_mysqld --user=mysql > /dev/null & && echo -n ' mysql'
# make sure that our sockets have initialized before continuing
# as other startup daemons depend on us
until /usr/bin/netstat | grep mysql\.sock > /dev/null;
do
echo -n ".";
sleep 1;
done
fi
--
Kenn Martin
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000203030503.A10082>
