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.
fixed in cvs.
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.
fixed again.