Question

Shared postrotate script failing

  • Posted June 17, 2014

My server just started emailing this <pre> etc/cron.daily/logrotate: error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/error.log ’ run-parts: /etc/cron.daily/logrotate exited with return code 1 </pre> I don’t know if it’s a permissions issue. Any advice?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I get: #Query OK, 0 rows affected (0.00 sec) it shoud be 1 row affected, right?

This can happen if the password for the debian-sys-maint MySQL user is wrong. If you look at the <code>/etc/logrorate.d/mysql-server</code> script it calls mysqladmin: <pre> MYADMIN=“/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf” </pre> Check the password with: <pre> cat /etc/mysql/debian.cnf </pre> Then make sure it is correct by logging in mysql with the root user and running: <pre> GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES, SUPER, LOCK TABLES ON . TO ‘debian-sys-maint’@‘localhost’ IDENTIFIED BY ‘REPLACE_WITH_REAL_PASSWORD’; </pre>