[debian-mysql] error: 'Access denied for user 'root'@'localhost' (using password: NO)'

Rainer Dorsch ml at bokomoko.de
Sun Nov 26 14:57:04 UTC 2017


Hello,

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

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


/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

When I run it locally

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

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 
insecure.

to get rid of the issue?

Many thanks
Rainer




-- 
Rainer Dorsch
http://bokomoko.de/



More information about the pkg-mysql-maint mailing list