【发布时间】:2023-03-16 10:04:01
【问题描述】:
$ 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
【问题讨论】:
-
你是怎么安装mysql的? bash 脚本是自定义的吗?
-
@Krishnanunni 我使用了check cookbook 和下面的config。
-
你在 mysql 中创建了一个名为 'debian-sys-maint' 的用户吗?还是你刚刚配置的?
-
我检查了
mysql.user表,debian-sys-maint@localhost在那里。 -
我认为,由于您的密码字符串以 '#' 开头,因此已被注释掉。所以不会有可读的密码。现在才注意到
标签: mysql debian chef-infra