Auto-start MySQL in OpenBSD 3.2

Problem
I got MySQL to install from the pre-packaged .tgz files OpenBSD provides using pkg_add, but I couldn't figure out how to get it to automatically start.

Get MySQL
You'll want Mysql-server-**.tgz from a openbsd ftp server or your official CD.

    #: pkg_add Mysql*

Changing Files
Check /etc/rc.conf to make sure that the following line is at the bottom:

local_rcconf="/etc/rc.conf.local"

If it doesn't exist, create /etc/rc.conf.local and add:


mysql=YES

Then:

    #: chmod 755 /usr/local/share/mysql/mysql.server

Then add this to /etc/rc.local:

if [ X"${mysql}" == X"YES" -a -x /usr/local/bin/safe_mysqld ]; then
	echo -n " mysqld"; /usr/local/share/mysql/mysql.server start
fi

reboot


Auto-start MySQL 5.0.24a in OpenBSD 4.0

I got MySQL 5.0.24a to install from the pre-packaged .tgz files OpenBSD 4.0 provides using pkg_add, but I couldn't figure out how to get it to automatically start.

reply

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <hr /> <a> <p> <em> <strong> <cite> <code> <blockquote> <ul> <ol> <li> <dl> <dt> <dd> <div> <img> <h1> <h2> <h3> <h4> <h5>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options