From owner-freebsd-questions@FreeBSD.ORG Mon Mar 28 21:31:14 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 E926016A4CE for ; Mon, 28 Mar 2005 21:31:14 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 725BC43D49 for ; Mon, 28 Mar 2005 21:31:14 +0000 (GMT) (envelope-from jeff.wirth@gmail.com) Received: by rproxy.gmail.com with SMTP id j1so1404111rnf for ; Mon, 28 Mar 2005 13:31:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=RJOFv7AkgZ8DHo7Xn537EBqQYr/e7FeHN5YxXm0xdUGLpwjJAffv8T/P8cTxPPpBBd2agiPmBHey9WjTun84Y8pmBSw5QVNyozxC4xsuXp1Zzey7FA2XAQqEF147YKiuS7na4W7T/6tV8WI3AtqZH+JAwHmLT9j5bjEyFbbeEn0= Received: by 10.38.14.25 with SMTP id 25mr133512rnn; Mon, 28 Mar 2005 13:31:13 -0800 (PST) Received: by 10.38.181.68 with HTTP; Mon, 28 Mar 2005 13:31:13 -0800 (PST) Message-ID: <5d2cf6920503281331bb8673e@mail.gmail.com> Date: Mon, 28 Mar 2005 16:31:13 -0500 From: Jeff Wirth To: John Public In-Reply-To: <20050328190323.15814.qmail@web50104.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <20050328190323.15814.qmail@web50104.mail.yahoo.com> cc: freebsd-questions@freebsd.org Subject: Re: su command problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jeff Wirth List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 21:31:15 -0000 >On Mon, 28 Mar 2005 11:03:23 -0800 (PST), John Public wrote: > Thanks for your quick reply. In answer to your query, NP > yes, I installed mysql 4.1 from ports, and it works > just fine if I start it using mysqld_safe. However, > if I attempt to run it from > /usr/local/etc/rc.d/mysql-server.sh, the same behavior > occurs. My reasoning for thinking it is a problem w/ > the su command is as follows: > > su -m mysql -c date first, I don't think the 'mysql' binary even has a '-c' option. If I'm following you here, you modify the default startup script (/usr/local/etc/rc.d/mysql-server.sh) to run `su -m mysql -c date`. Instead of the default (w/flags): /usr/local/bin/mysqld_safe --user=${mysql_user} --datadir=${mysql_dbdir} --bind-address=${bind_address} --pid-file=${pidfile} > /dev/null & why? > When I got to digging around in the rc system while I > was having the same problem w/ nagios, I discovered > that it is using the su command. Hope this makes > sense. Once again, thanks for your input and any > further insight would be appreciated. I would take a look at the default mysql startup script and compare it to what you currently have in place. (/path/to/ports/database/mysql41-server/files/mysql-server.sh) -jw