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