Logrotate Access denied for user 'root'@'localhost' (using password: NO)'

I have logrotate running as a cron job every evening, it was running for a while but stopped.

Checking the syslog I found the error: Logrotate Access denied for user ‘root’@‘localhost’ (using password: NO)’

Looking online this error seemed pretty common and most people fixed this via adding "mysqladmin --defaults-file=/root/.my.cnf ".

Unfortunately this has not worked for me and I am still receiving the same error.

My first thought was that someone had changed the root password but I am able to use .my.cnf to set root for myself.

Any thoughts and assistance would be greatly appreciated.

Hello CallumCampbell2000 and welcome to the Percona Community.

The error is clearly stating that it is not using the password.

Checking the syslog I found the error: Logrotate Access denied for user ‘root’@‘localhost’ (using password: NO)’

Can you see if the cron is able to really access the “.my.cnf” file?

ls -l ~/.my.cnf
cat .my.cnf

Also if you can share

  1. Manual exec of logrotate with -d
  2. logrotate config

Thanks,
Kedar