$ cat /etc/mysql/debian.cnf                                               1 ↵
[client]
host     = localhost
user     = debian-sys-maint
password = #%@u5D2Y0eP5
socket   = /var/run/mysqld/mysqld.sock

[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = #%@u5D2Y0eP5
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

但是,当我试图检查mysql的状态时:
$ service mysql status
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: NO)'

我很困惑为什么它不使用我给的密码?
Mysql:14.14发行版5.5.31
Debian:气喘
还有,here's my /etc/mysql/my.cnf configuration文件。

最佳答案

问题是我的密码有特殊字符,我试着把密码改成字母,现在它能用了。

关于mysql - 访问被拒绝'debian-sys-maint'@'localhost',我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17268980/

10-15 00:47