I'm new to Linux and have setup a VPS running Ubuntu 16.04 with postfix, dovecot and rouncube using mariadb for the database. It all seem to be working okay but I regularly receive the following email:
/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
I've done some searching and found a post suggesting I need to create a /root/.my.cnf file which I have done and have since restarted the server etc. but I am still receivng the error. The contents of my /root/.my.cnf are as follows:
[mysqladmin] password = *mypassword* user = root [mysql] password = *mypassword*
Does anyone know if there is something I'm missing or anything else I need to configure to get this to use the mysql password perhaps?