Back to the sea ; the relational database management system (RDBMS), episode VI

    

At least my Web 2.0 application (aka WordPress) requires a database system.
I’m used to using MySQL and that’s what I installed on my OpenBSD server.

Installation

MySQL is available as a binary package:

# pkg_add http://ftp.fr.openbsd.org/pub/OpenBSD/4.8/packages/amd64/mysql-server-5.1.48.tgz
mysql-server-5.1.48:p5-Net-Daemon-0.43: ok
mysql-server-5.1.48:p5-PlRPC-0.2018p0: ok
mysql-server-5.1.48:p5-DBI-1.609: ok
mysql-server-5.1.48:mysql-client-5.1.48: ok
mysql-server-5.1.48:p5-DBD-mysql-4.014: ok
mysql-server-5.1.48: ok
--- +mysql-server-5.1.48 -------------------
You can find detailed instructions on how to install a database
in /usr/local/share/doc/mysql/README.OpenBSD.

# /usr/local/bin/mysql_install_db
Installing MySQL system tables...
(...)
Alternatively you can run:
/usr/local/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

Please report any problems with the /usr/local/bin/mysqlbug script!

# vi /etc/login.conf
#
# MySQL
#
mysql:
        :openfiles-cur=1024:
        :openfiles-max=2048:
        :tc=daemon:

# cap_mkdb /etc/login.conf
# vi /etc/rc.local
if [ -x /usr/local/bin/mysqld_safe ] ; then
        echo -n ' mysql'
        su -c mysql root -c '/usr/local/bin/mysqld_safe >/dev/null 2>&1 &'
fi

# su -c mysql root -c '/usr/local/bin/mysqld_safe >/dev/null 2>&1 &'
# /usr/local/bin/mysql_secure_installation
(...)
All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

That’s All Folks!