From owner-freebsd-questions@FreeBSD.ORG Tue Jun 14 11:21:15 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 40B3916A41C for ; Tue, 14 Jun 2005 11:21:15 +0000 (GMT) (envelope-from ltsampros@upnet.gr) Received: from mail.vivodinet.gr (mail3.vivodinet.gr [80.76.39.13]) by mx1.FreeBSD.org (Postfix) with SMTP id 4B12343D1D for ; Tue, 14 Jun 2005 11:21:13 +0000 (GMT) (envelope-from ltsampros@upnet.gr) Received: (qmail 23816 invoked from network); 14 Jun 2005 11:21:09 -0000 Received: from dslcustomer-222-89.vivodi.gr (HELO ?10.0.0.1?) (83.171.222.89) by 0 with SMTP; 14 Jun 2005 11:21:09 -0000 Message-ID: <42AEBDA5.2000107@upnet.gr> Date: Tue, 14 Jun 2005 14:21:09 +0300 From: Tsampros Leonidas User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gerard Seibert , freebsd-questions@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Starting MySQL at bootup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2005 11:21:15 -0000 Gerard Seibert wrote: > This is probably a dumb question, but I will ask it anyway. > > I have 'mysql' installed. From what I have deduced from the > documentation, I should start it using 'mysqld_safe'. I am assuming that > I would use the syntax 'mysqld_safe &' to force the program into the > background upon starting. What I can not seem to figure out is how to > get the program to start automatically upon boot up. > Usually, when you install a service such mysql from the ports collection all of it's files are installed with --prefix=/usr/local . That means that the usual startup scripts and configuration files are installed at /usr/local/etc . Taking a look at the file /usr/local/etc/rc.d/mysql-server.sh , you'll see enough comments on how to configure your system , to start mysql automatically upon boot up. # Add the following line to /etc/rc.conf to enable mysql: # mysql_enable (bool): Set to "NO" by default. # Set it to "YES" to enable MySQL. # mysql_limits (bool): Set to "NO" by default. # Set it to yes to run `limits -e -U mysql` # just before mysql starts. # mysql_dbdir (str): Default to "/var/db/mysql" # Base database directory. # mysql_args (str): Custom additional arguments to be passed # to mysqld_safe (default empty). This is the entries i have in my /etc/rc.conf file : mysql_enable="YES" #mysql_dbdir="/usr/local/data" #mysql_args="--log=/var/log/mysql.log "