I'm getting a daily message from the cron job for logrotate that's trying to swap the MySQL logs. I couldn't find anything in the forum about how to get rid of it. I can log in as the root user to the database, so I must have specified the password when I was setting up the database. I used the Ubuntu 16.04 Perfect Server script. /etc/cron.daily/logrotate: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log ' run-parts: /etc/cron.daily/logrotate exited with return code 1 Does anyone know where to specify the password so it isn't a security problem? I tried creating /root/.my.cnf file with the credentials but that doesn't seem to work - it didn't work after I restarted mysql. Thanks, Bob
Did you found a solution? I have the same problem. I added the root password to /etc/mysql/debian.cnf but the login still fails.
Adding the password into the debian.cnf file worked for me. There were two places to add it - I added it in both. Something worked! Bob