Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76909 - mysql 4.1 logrotate config : fails if no log files
Summary: mysql 4.1 logrotate config : fails if no log files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-06 08:47 UTC by Mathias Gug
Modified: 2005-02-01 13:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Gug 2005-01-06 08:47:54 UTC
If there is no mysqld log file, logrotate complains :
stat of /var/log/mysql/mysqld.err failed: No such file or directory.

This happens on a webserver, using php with mysql support, but where the mysql database is on a different machine.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




A fix is to add the option missingok to /etc/logrotate.d/mysql.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-06 19:40:26 UTC
fixed in cvs.
Comment 2 Mathias Gug 2005-02-01 13:21:08 UTC
missingok keryword is placed after postrotate :

# cat /etc/logrotate.d/mysql

/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err {
monthly
create 660 mysql mysql
notifempty
size 5M
sharedscripts
postrotate
missingok
/sbin/kill -HUP `cat /var/run/mysqld/mysqld.pid`
endscript
}

It should be before postrotate/endscript.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-02-01 13:52:13 UTC
fixed again.