Subject: Re: netbsd 3.0 and mysql 5.0 - problem with /bin/sh??
To: None <netbsd-users@NetBSD.org>
From: Stuart Brooks <stuartb@cat.co.za>
List: netbsd-users
Date: 07/18/2006 17:00:22
> I have a strange problem. I am running mysqld (5.0.20) on NetBSD 3.0
and
> after the startup scripts are complete the mysqld process ramps up to
> 100% utilization. However this only happens if I make mysql calls from
> within the startup scripts.
>
> If I wait until the startup scripts have completed before accessing
the
> database, then everything is ok. The server is being run as follows:
>
> /usr/pkg/libexec/mysqld -uroot &
>
> and I am accessing it using something like:
>
> echo "select * from MyTable" | /usr/pkg/bin/mysql -uroot -ppassword
> MyDatabase
>
> If these are put next to each other in the startup scripts (rc.local),
> mysqld becomes very unhappy.

I seem to have found a workaround - the script where mysqld was being
run from was executed using:

/bin/sh startup_script

where startup_script contains a single line (as above) to start mysqld.
If I execute the startup script using csh:

/bin/csh startup_script

then the problem goes away and I can happily make sql calls from within
further  scripts (sh or csh) in the startup process. So it looks to me
like a quirk with /bin/sh? Does this make sense to anybody?

 - Stuart