首页 > 解决方案 > 错误 1045 (28000): 拒绝用户 'powerdns_user'@'localhost' 的访问(使用密码:是)

问题描述

如果我运行mysql -u powerdns_user -p,我可以输入密码并正常连接:

[root@rdns1 ~]# mysql -u powerdns_user -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 427
Server version: 5.5.68-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

但是,第三方系统无法连接(Can't connect to MySQL server on '192.168.1.1' (111))。然后我尝试在 MySQL 服务器本身上指定 IP,输入密码时失败:

[root@rdns1 ~]# mysql -u powerdns_user -p -h 192.168.1.1 -P 3306
Enter password:
ERROR 1045 (28000): Access denied for user 'powerdns_user'@'tld.myserver.com' (using password: YES)
[root@rdns1 ~]#

192.168.1.1 代表公共 IPv4 地址(出于隐私原因被屏蔽)。

关于我应该在这里做什么的任何想法将不胜感激。

注意:我已经尝试在 MySQL 配置文件中注释 bind-address 并重新启动服务。

标签: mysql

解决方案


推荐阅读