Web lists-archives.com

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




On 26.11.2017 18:48, Rainer Dorsch wrote:

> root@scw:/etc/logrotate.d#  cat /etc/mysql/debian.cnf
> # Automatically generated for Debian scripts. DO NOT TOUCH!
> [client]
> host     = localhost
> user     = root
> password = 
> socket   = /var/run/mysqld/mysqld.sock
> [mysql_upgrade]
> host     = localhost
> user     = root
> password = 
> socket   = /var/run/mysqld/mysqld.sock
> basedir  = /usr

That' not the content i expected. But explains you error message.

in my system looks like

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = long_random_string
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = long_random_string
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

so i think, you should change the user and password in this file. And
also make sure that the user debian-sys-maint exists in the MySQL
database and have the configured password.

best regards
Ulf