From owner-freebsd-questions@FreeBSD.ORG Wed Jan 12 15:29:51 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B8D316A4CE for ; Wed, 12 Jan 2005 15:29:51 +0000 (GMT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 145F943D4C for ; Wed, 12 Jan 2005 15:29:51 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id j0CFTjx23317; Wed, 12 Jan 2005 10:29:45 -0500 (EST) From: Jerry McAllister Message-Id: <200501121529.j0CFTjx23317@clunix.cl.msu.edu> To: andy@firman.us Date: Wed, 12 Jan 2005 10:29:45 -0500 (EST) In-Reply-To: <20050112141527.GB17381@akroteq.com> from "Andy Firman" at Jan 12, 2005 05:15:27 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Trouble starting MySQL [SOLVED?] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2005 15:29:51 -0000 > > /usr/local/bin/mysqld_safe --user=mysql > > mysql 1347 0.0 2.5 55852 25832 ?? S 11:26AM 0:00.14 > > /usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/ > > colin 1359 0.0 0.1 1476 896 p2 S+ 11:26AM 0:00.00 grep > > mysql > > > > Good, but I'm just puzzled why/how this worked from webmin. It doesn't > > make sense. One thing, it started mysql as can be seen above from > > /usr/local/bin/mysqld_safe, which sure 'aint the script way. > > > > Then again, the "script way" from CLI didn't work. > > > > > > I hear your frustration. I was asking about this on Dec. 18, 2004 > and I did not get any answers. Look at this: > http://lists.freebsd.org/pipermail/freebsd-questions/2004-December/068425.html > > I am still confused about /usr/local/etc/rc.d vs /etc/rc.conf. > > Can anyone educate us how this works on FreeBSD 4.10? The only thing you should possibly have in /etc/rc.conf or maybe /etc/rc.conf.local are setting variables. Most things do not even need that. Do not _execute_ anything from rc.conf for startups. All startups should be in scripts in /usr/local/etc/rc.d. The main startup executes every script in /usr/local/etc/rc.d that ends in '.sh' and has execute permission set. I think the order is alphabetic sort order. Make your script take a 'start' as its first argument. Besides, most installs for ports put a usefully functioning xxx.sh startup script in /usr/local/etc/rc.d when you do the install. For some you have to change the permissions to allow it to execute. Check in the ports xxx.sh script to see how it starts and if you need to set any environment variables or change any addresses. This is all well documented if you look. ////jerry > I have nothing in rc.conf pertaining to mysql, but the mysql server > starts just fine when I boot my FreeBSD 4.10 stable box? > > mysql-server-4.0.21 installed from ports. > _______________________________________________