Report this

What is the reason for this report?

Shared postrotate script failing

Posted on 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?



This textbox defaults to using Markdown to format your 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.

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>

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.