From owner-freebsd-questions@FreeBSD.ORG Thu Aug 28 05:56:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39405106564A for ; Thu, 28 Aug 2008 05:56:34 +0000 (UTC) (envelope-from joeb@a1poweruser.com) Received: from mail-03.name-services.com (mail-03.name-services.com [69.64.155.195]) by mx1.freebsd.org (Postfix) with ESMTP id 28CAC8FC1A for ; Thu, 28 Aug 2008 05:56:34 +0000 (UTC) (envelope-from joeb@a1poweruser.com) Received: from laptop ([202.69.172.125]) by mail-03.name-services.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 27 Aug 2008 22:56:19 -0700 From: "joeb" To: Date: Thu, 28 Aug 2008 13:56:31 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <1587E1CA38444A64AC903BEA6D1B9CA9@a64x23800p> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Importance: Normal X-OriginalArrivalTime: 28 Aug 2008 05:56:19.0990 (UTC) FILETIME=[CB125360:01C908D2] Subject: RE: mysql-server-5.1.22 system administration docs onFreeBSD7.0-RELEASE-i386 ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: joeb@a1poweruser.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2008 05:56:34 -0000 To autostart mysql at boot add this to /etc/rc.conf mysql_enable="YES" Add this to /etc/rc.conf to direct to use this location where there is disk space to hold your databases mysql_dbdir="/usr/local/mysql" To start or stop mysql server do this /usr/local/share/mysql/mysql.server start /usr/local/share/mysql/mysql.server stop You have to tell mysql to create its internal control db by running this command one time first before trying to create databases. mysql_install_db --user=mysql To verify mysql is operational issue these commands mysqladmin version mysqladmin variables To start command line session with mysql server to create a DB enter mysql -u root The online mysql manual is at http://dev.mysql.com/doc/refman/5.0/en/index.html The mysql databases and log files are written here /var/db/mysql -----Original Message----- From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of David Christensen Sent: Thursday, August 28, 2008 1:47 PM To: freebsd-questions@freebsd.org Subject: RE: mysql-server-5.1.22 system administration docs onFreeBSD7.0-RELEASE-i386 ? Fraser Tweedale wrote: > put the following line in /etc/rc.conf: > mysql_enable="YES" > and run (as root): > /usr/local/etc/rc.d/mysql-server start # echo 'mysql_enable="YES"' >> /etc/rc.conf # /usr/local/etc/rc.d/mysql-server start Starting mysql. # mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.22-rc FreeBSD port: mysql-server-5.1.22 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> Ahhh -- much better. :-) The explanation is here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcd.h tml Since the rc.d system is primarily intended to start/stop services at system startup/shutdown time, the standard start, stop and restart options will only perform their action if the appropriate /etc/rc.conf variables are set. For instance the above sshd restart command will only work if sshd_enable is set to YES in /etc/rc.conf. ... freebsdemail@gmail.com wrote: > Try adding mysql_enable="YES" to /etc/rc.conf after this is done try > starting again via the rc script. In the future pass the parameter > rcvar to the rc script. > Eg. /usr/local/etc/rc.d/mysql-server rcvar > mysql_enable="YES" this would indicate what to add to rc.conf # /usr/local/etc/rc.d/mysql-server rcvar # mysql mysql_enable=YES The explanation is here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcd.h tml It is easy to check if a service is enabled in /etc/rc.conf by running the appropriate rc.d script with the option rcvar. Thus, an administrator can check that sshd is in fact enabled in /etc/rc.conf by running: # /etc/rc.d/sshd rcvar # sshd $sshd_enable=YES Thanks! David _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"