Comment 2 for bug 513135

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 513135] [NEW] MySQL logrotate script returns with error when server isn't running

On Wed, Jan 27, 2010 at 08:00:50AM -0000, reini wrote:
> Public bug reported:
>
> Every day, I get a mail from the cron daemon that the logrotate script
> for mysql failed to run:
>
> /etc/cron.daily/logrotate:
> /usr/bin/mysqladmin: connect to server at 'localhost' failed
> error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
> Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
>
>
> I don't know what the little telephone is supposed to imply, but the mail is hugely annoying in the long run.
> I only use mysql as a database for some projects I'm developing and therefore rarely need to run it. Since this is a laptop, I prefer to keep it inactive unless I need it. The logrotate script therefore usually can't connect to a running mysql daemon.
>
> I would expect the script to silently do nothing, since this is not an
> error.
>

Well - this is an edge use case. Most of the systems that have mysql-server
installed are running mysqld as a daemon and expect it to be running all the
time. If the daemon is not running, it may be a good thing that a notice is
sent. I don't know whether it should be a message from logrotate though.

  importance low
  status confirmed

--
Mathias Gug
Ubuntu Developer http://www.ubuntu.com