*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
To configure OpenBSD to automatically start mysql with every system start-up then you can edit the rc.conf.local file to modfiy the configuration and rc.local to take action when the configurations are set.
Edit: /etc/rc.conf.local file to include in Section 2 the following lines:
mysql=YES
Edit: /etc/rc.local
After the 'starting local daemons' and before the following echo '.', Insert the following instructions to the /etc/rc.local file:
echo -n 'starting local daemons:'
# [ ... stuff left out ... ]
if [ X"${mysql}" == X"YES" -a -x /usr/local/bin/mysqld_safe ]; then
for i in 1 2 3 4 5 6; do
if [ -S /var/run/mysql/mysql.sock ]; then
break
else
sleep 1
echo -n "."
fi
done
fi
# [ ... stuff left out ... ]
echo '.'
Now each restart of the machine will automatically check to see whether we have enabled mysql in the configuration file (rc.conf) and then start the mysql daemon. If we wish to disable mysql we can simply change mysql=YES to mysql=NO
Note: /usr/local/share/mysql/mysql.server is a script for starting/stopping mysql daemon. The files are there with mysql-server-4.0.18 on OpenBSD 3.5 so your mileage may vary.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.