Shared postrotate script failing

  • Posted on June 17, 2014
  • abronowAsked by abronow

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?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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>