[debian-mysql] Bug#664639: mysql and logging

Nicholas Bamber nicholas at periapt.co.uk
Mon Jul 16 19:44:27 UTC 2012


On 16/07/12 11:26, Bjoern Boschman wrote:
> Hi Nicholas,
> 
> the basic problem can be reproduced as follows:
> 
> configure error logging:
> 
> [mysqld]
> log-error = /var/log/mysql/error.log
> 
> and restart mysql-server
> 
> chown root /var/log/mysql/error.log
> mysqladmin --defaults-file=/etc/mysql/debian.cnf flush-logs
> mysqladmin: refresh failed; error: 'Unknown error'
> 
> 
> The problem seems to be related in mysqld_safe which under some
> circumstances creates the log-error file with root as file owner.
> 
> I definately did not do this on purpose, but it might come from on
> older 5.1 installation.

Well I want to know how this happened before fixing it. Otherwise I
think the risks outweight the benefits.

> 
> When you manually fix the file-owner (chown mysql
> /var/log/mysql/error.log ) the problem disappers.
> 
> -snip-
> regarding mysqld startup:
> 
> the SVN/experimental fix is basically :ugly:
> from some discussion on the #mysql.de channel I very likely believe we
> should not be using mysqld_safe at all, but start the mysqld process
> directly.
> Unfortunatelly I did not find the time to write a proposal for an
> updated init-script yet :(

I am somewhat more sympatheic to this view than CLint appears to be, but
that does not amount to a commitment to implement it. What I want to do
is as follows:

1.) work out how to reproduce or otherwise the various init/maint script
 bugs. If possible these should be incorporated into the integration
tests I now have.
2.) Then compare the costs and benefits working with the existing set up
as opposed to getting rid of mysqld_safe. (systemd and upstart also need
to be considered here).

Really 1.) has to be done before 2.) Also I want to the conversion to
git rename the source package to "mysql" and do the package
restructuring first.

> 
> -snip_
> regarding logrotate:
> 
> problem with logrotate basically is that we do not have any clue which
> logfiles will be created as this information comes from the mysqld config.
> From the distributed my.cnf no logging is done at all.

Yes this is why I like this change. It looks like it enhances the
robustness of our packaging. Thanks.

> 
> I'll get back to you @IRC as soon as my employee will leave me some
> time to do so ;-)

Best wishes to your employer. You're welcome to work on this but a delay
suits me fine .

> 
> 
> Cheers
> B
> 



More information about the pkg-mysql-maint mailing list