supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Alex Efros <powerman@sky.net.ua>
Subject: Re: Warning about mysqld's behaviour
Date: Thu, 14 Apr 2005 15:07:50 +0300	[thread overview]
Message-ID: <20050414120750.GB21873@home.power> (raw)
In-Reply-To: <20050414085007.3830.qmail@b6398251b71d42.315fe32.mid.smarden.org>

Hi!

On Thu, Apr 14, 2005 at 08:53:06AM +0000, Gerrit Pape wrote:
> > Version of mysql is 3.23.58. I haven't looked at other versions, so don't 
> > know whether this is new or old brain-damage.
> > 
> > I have a straightforward run file:
> > 
> > #!/bin/sh
> > exec /usr/libexec/mysqld \
> >  --defaults-file=/etc/my.cnf \
> >  --basedir=/usr \
> >  --datadir=/var/lib/mysql \
> >  --user=mysql \
> >  --pid-file=/var/run/mysqld/mysqld.pid

I use this ./run with MySQL 4.0.x. It allow me control mysql using runsvctrl:
---cut---
#!/bin/bash
exec </dev/null >/dev/null 2>/dev/null
SHUTPASS="HERE_IS_ME_PASSWORD"
trap "mysqladmin -u shutdown -p$SHUTPASS shutdown" 0
trap 'exit 2' 1 2 3 15
mysqld_safe --default-character-set=koi8_ru & wait
---cut---
(I've special user "shutdown" with only permission to shutdown server
because I dislike use "root" user and put it password in this script.)

I've switched from sending TERM to mysqld to using "mysqladmin shutdown"
some time ago because on very busy server sending TERM sometimes result
in damaging database. There was number of cases when after reboot with
"init 6" I found database crashed. :(

-- 
			WBR, Alex.


  reply	other threads:[~2005-04-14 12:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-11  3:16 Charlie Brady
2005-04-14  8:53 ` Gerrit Pape
2005-04-14 12:07   ` Alex Efros [this message]
2005-04-14 15:29     ` Charlie Brady
2005-04-14 18:05   ` Vincent Danen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050414120750.GB21873@home.power \
    --to=powerman@sky.net.ua \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).