Tune MySQL on NetBSD and OpenBSD

       151 words, 1 minutes

For quite a few days now, in my “optimize than damm WordPress” quest, I’m playing with Ubuntu, NetBSD and OpenBSD in (VMware Fusion) virtual machines and spare hardware I have. One of the idea is to optimize MySQL on those systems. The MySQL configuration file in named my.cnf and is not located in the same place on every systems…

NetBSD and my.cnf

On NetBSD, the configuration examples are located in /usr/pkg/share/examples/mysql/:

# cp -p /usr/pkg/share/examples/mysql/my-large.cnf /usr/pkg/my.cnf
# vi /etc/rc.conf
(...)
mysqld=YES
(...)
# vi /etc/rc.local
(...)
/usr/pkg/share/examples/rc.d/mysqld start
(...)

OpenBSD and my.cnf

On OpenBSD, the configuration examples are located in /usr/local/share/mysql/:

# cp -p /usr/local/share/mysql/my-large.cnf /etc/my.cnf
# vi /etc/rc.conf.local
(...)
mysqld_flags=""
rc_scripts="mysqld"
(...)

Commons

One of the things I customized are the socket reference to deal with chroot modes:

(...)
[client]
socket = /var/chroot/www/run/mysql.sock
(...)
[mysqld]
socket = /var/chroot/www/run/mysql.sock
(...)

Quite simple when you finally find the correct file locations… :)