The Propper way to fire up MySQL

been pulling my hair out as cron wasnt firing up, tracked the problem down to rc.local, the command to start mysql was preventing cron from running but everything seemed A-OK on the outside.
heres the correct lines to insert into rc.local on OpenBSD to fireup mysql without causing any knock on effects:
if [ -x /usr/local/bin/mysqld_safe ]; then
/usr/local/bin/mysqld_safe > /dev/null & echo -n 'mysql '

3 Replies to “The Propper way to fire up MySQL”

  1. Thanks for clarifying that – it was just what I needed for my dev box which will be going live soon!

  2. Apparently – there is a user created by the OpenBSD pkg to run the mysql server daemon. As such, the command can be changed to:

    /usr/local/bin/mysqld_safe -u _mysql > /dev/null & echo -n ‘ mysqld’;

Comments are closed.