首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么错误1045 (28000):在ProxySQL服务器中拒绝访问?

问为什么错误1045 (28000):在ProxySQL服务器中拒绝访问?
EN

Stack Overflow用户
提问于 2020-04-26 09:27:49
回答 1查看 4.2K关注 0票数 5

我已经在MySQL主服务器上设置了proxysql,以便进行读写拆分。MySQL主站和从站,proxysql服务器正在运行,但是我在proxysql终端上发现了一个Access denied错误。

代码语言:javascript
复制
[devops@DRMBUST05 ~]$ mysql -uproxysql -p**** -h 127.0.0.1 -P 6033
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.30 (ProxySQL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> show databases;
ERROR 1045 (28000): Access denied for user 'proxysql'@'172.17.222.175' (using password: YES)
mysql>

这是proxysql.log

代码语言:javascript
复制
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).

我确信我可以用proxysql中配置的用户名和密码连接到MySQL主站和从站,如下所示:

代码语言:javascript
复制
[devops@DRMBUST05 ~]$ mysql -u proxysql -h 127.0.0.1 --port 33003 -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1152
Server version: 8.0.16 MySQL Community Server - GPL

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| devops             |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.00 sec)

mysql>

这是因为我在MySQL主机上安装了proxysql吗?有人知道怎么回事吗?任何提示都将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-29 16:33:10

ProxySQL不支持引入MySQL 8的caching_sha2_password。

你要么需要:

  • 在proxysql中设置admin-hash_passwords=false,或
  • 将MySQL中该用户的身份验证机制更改为mysql_native_password。(旧的身份验证机制)。

相关github问题

票数 10
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61438510

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档