starting mysql server automatically

Chris Hodgins christopher.hodgins at gmail.com
Sat May 7 08:33:48 PDT 2005


On 5/6/05, Paul Keyes <paul_s_keyes at yahoo.ca> wrote:
> Hi All,
> 
> I'm setting up a server running Freebsd 5.3  I have
> mysql running well but I can't seem to get it to start
> automatically at boot time.  I can only start it as
> root with the command:
> mysqld_safe --user=mysql &
> 
> (when I do this everything works fine)
> 
> I tried installing the mysql.server sript as:
> /usr/local/etc/rc.d/mysql.server.sh
> but when I try to run it manually I get this:
> ./mysql.server.sh: 102: Syntax error: Bad for loop
> variable
> 
> What is the best way to get the mysql server running
> automatically when the computer boots?
> 
> Thanks,
> Paul
> 

Make sure this line appears in /etc/rc.conf:
mysql_enable="YES"

Then reboot and you should be able to see it in sockstat:

$ sockstat -4 | grep mysql
mysql    mysqld     529   3  tcp4   *:3306                *:*

If that still does not work then you might want to post you
mysql-server.sh file so we can see if you have any obvious problems
with it.

Chris


More information about the freebsd-questions mailing list