$ 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 Distrib 5.5.31
Debian:Wheezy