On 4/7/2012 1:40 PM, Antoine Jacoutot wrote:
On Sat, Apr 07, 2012 at 01:01:07PM -0600, Steve Williams wrote:
Hi,

I recently updated my system from an ancient 4.6<something>  to the
April 2 snapshot.  Let me say, between sysmerge and pkg_add -ui,
it's an amazingly painless process!

This is i386 on a Dell Optiplex 755, though that's not relevant.

At some point in time (I've been using OpenBSD since 2.7), I got a
recommendation to start mysql by adding an entry in the login.conf
file:
mysql:\
         :openfiles-cur=1024:\
         :openfiles-max=2048:

Then, in the rc.local file, I was starting mysql via:
if [ -x /usr/local/bin/mysqld_safe ] ; then
         su -c mysql root -c '/usr/local/bin/mysqld_safe>/dev/null 2>&1&'
         echo -n ' mysql'
fi

This was so that mysql would have enough file descriptors when it
ran.  I am currently running:
     mysql-client-5.1.62 multithreaded SQL database (client)
     mysql-server-5.1.62 multithreaded SQL database (server)

When I look at the /etc/rc.d/mysqld file, I see no mechanism to
start mysql with an increased number of file descriptors.  I did
notice that the system default "openfiles-cur" was boosted during
the "sysmerge" upgrade process.

I use (for personal use only) gallery3, wordpress, roundcubemail, so
it's not super heavy use of mysql.

What is the accepted way to start mysql these days?
You want to add mysqld in the pkg_scripts variable in rc.conf.local(8) (and 
remove the mysql startup lines from rc.local of course).
Then change your mysql class in login.conf(5) from mysql to mysqld.

See rc.d(8) for more information but in a nutshell an rc script will use the 
class which matches its name -- if there is no matching class, then 'daemon' 
will be used.

That's way cool!  Thanks very much for the pointer :)

Cheers,
Steve

Reply via email to