If one has mysql installed but not running then the default postrotate script in the logrotate description fails with: cat: /var/run/mysqld/mysqld.pid: No such file or directory Usage: kill pid ... Send SIGTERM to every process listed. kill signal pid ... Send a signal to every process listed. kill -s signal pid ... Send a signal to every process listed. kill -l List all signal names. kill -L List all signal names in a nice table. kill -l signal Convert between signal numbers and names. error: error running shared postrotate script for /var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err Whilst not 100 % foolproof the following alternative in postrotate will (with the exception of the pid file disappearing at extremely short notice) function correctly: [ -r /var/run/mysqld/mysqld.pid ] && /bin/kill -HUP $(</var/run/mysqld/mysqld.pid) Note that this does not cause problems, it's just annoying. Reproducible: Always Steps to Reproduce:
*** Bug 183134 has been marked as a duplicate of this bug. ***
Created attachment 179673 [details, diff] Simple patch to avoid this error
Implemented in new mysql-init-scripts-2.0_pre1