From owner-freebsd-questions Tue Feb 29 14:57:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.alpha.net.au (mail2.alpha.net.au [203.41.44.8]) by hub.freebsd.org (Postfix) with ESMTP id 97FB937BC73 for ; Tue, 29 Feb 2000 14:57:08 -0800 (PST) (envelope-from dannyh@idx.com.au) Received: from freebsd.freebsd.org (surry-pool-247.alpha.net.au [203.41.44.247] (may be forged)) by mail.alpha.net.au (8.9.3/8.9.3) with SMTP id JAA02304; Wed, 1 Mar 2000 09:57:51 +1100 From: Danny To: "Coke" , Subject: Re: Starting mysqld as background daemon on startup Date: Thu, 2 Mar 2000 09:54:54 +1100 X-Mailer: KMail [version 1.0.21] Content-Type: text/plain References: <001801bf82c2$adb8d0e0$03c8280a@pcgernot> MIME-Version: 1.0 Message-Id: <00030209591803.00323@freebsd.freebsd.org> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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