Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Mar 2000 09:54:54 +1100
From:      Danny <dannyh@idx.com.au>
To:        "Coke" <coke@aon.at>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Starting mysqld as background daemon on startup
Message-ID:  <00030209591803.00323@freebsd.freebsd.org>
References:  <001801bf82c2$adb8d0e0$03c8280a@pcgernot>

next in thread | previous in thread | raw e-mail | index | archive | help
Luckly FreeBSD make this type of job easy. Compared to Linux where you have to
manuually modify /etc/rc.d/rc.1 and /etc/rc.d/rc.local etc etc

In FreeBSD all you have to do is create a startup script like so:-
(assuming you have su privilages)

1)cd /usr/local/etc/rc.d/
2)pico mysql.sh

In the pico editor type in

#!/bin/sh
#

if [ -x /usr/local/bin/safe_mysqld ]
then
	/usr/local/bin/safe_mysqld & && echo -n ' mysql'
fi

3)Exit from pico by typing control x
4) You should see a file called mysql.sh
6) Type in chmod 755 mysql.sh
7) Type reboot

And ideally it should start up mysql automatcially if you followed the
instruction exactly.

Looking forward to your feedback.

danny

dannyh@idx.com.au


On Wed, 01 Mar 2000, Coke wrote:
> Hi
> 
> I installed the MySQL-Server and put the following line to /etc/rc.local :
> (I needed to create the file)
> /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/usr/local/var --us
> er=root
> 
> This line is working well but the sh-processes which load the /etc/rc and
> the /etc/rc.local files on startup are in the memory in the whole up-time of
> the machine. The autoboot script also stops execution with the rc.local
> script so the next autoloads aren't executed.
> 
> So I want to load the mysqld as a background daemon... but I don't know how
> to do that. I know that there is a /usr/local/bin/daemon command but this is
> not installed on my machine... Is there another way to load that process in
> the background?
> btw
> /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/usr/local/var --us
> er=root &
> doesn't work either.
> 
> Please help me out!
> 
> Thank you very much :)
> 
> Regards
> Gernot
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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