[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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


I get (daily :-) mails from my cron.daily with the content

Cron <root@scw> test -x /usr/sbin/anacron || ( cd / && run-parts --report /
etc/cron.daily )

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

When I run it locally

root@scw:~#  test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/
cron.daily )

I do not hit the same issue.

Do I need to specify

       ·   --password[=password], -p[password]

           The password to use when connecting to the server. If you use the 
short option form (-p), you cannot have a space between the option and the 
password. If you omit
           the password value following the --password or -p option on the 
command line, mysqladmin prompts for one.

           Specifying a password on the command line should be considered 

to get rid of the issue?

Many thanks

Rainer Dorsch

Reply to: