Starting MySQL at bootup
Tsampros Leonidas
ltsampros at upnet.gr
Tue Jun 14 11:21:15 GMT 2005
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.
<from mysql-server.sh>
# 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).
</from mysql-server.sh>
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 "
More information about the freebsd-questions
mailing list