Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql客户端登陆失败 [ClientConn] "readHandshakeResponse" "error" #591

Open
jinjinzhong opened this issue Oct 26, 2020 · 3 comments
Open

Comments

@jinjinzhong
Copy link

jinjinzhong commented Oct 26, 2020

大大麻烦看一下这个问题,谢谢🙏

代码用的最新的 master

客户端登陆报错:

2020/10/26 17:04:27 - ERROR - server.go:[386] - [server] "onConn" "ERROR 1045 (28000): Access denied for user 'kingshard'@'127.0.0.1:53898' (using password: Yes)" "" conn_id=0
2020/10/26 17:04:51 - ERROR - conn.go:[242] - [ClientConn] "readHandshakeResponse" "error" "auth=[40 109 47 21 22 169 150 81 126 24 113 175 94 28 38 177 111 51 247 161 138 87 182 251 140 58 180 9 193 222 17 87]|checkAuth=[208 212 154 156 191 112 158 114 18 192 32 238 181 116 171 227 209 222 164 228]|client_user=kingshard|config_set_user=kingshard|password=kingshard" conn_id=0
2020/10/26 17:04:51 - ERROR - conn.go:[108] - [server] "readHandshakeResponse" "ERROR 1045 (28000): Access denied for user 'kingshard'@'127.0.0.1:53907' (using password: Yes)" "msg=read Handshake Response error" conn_id=10004
2020/10/26 17:04:51 - ERROR - server.go:[386] - [server] "onConn" "ERROR 1045 (28000): Access denied for user 'kingshard'@'127.0.0.1:53907' (using password: Yes)" "" conn_id=0

配置:

# server listen addr
addr : 0.0.0.0:9696

# prometheus server listen addr
prometheus_addr : 0.0.0.0:7080

# server user and password
user_list:
-
    user :  root
    password : root
-
    user :  kingshard
    password : kingshard

# the web api server
web_addr : 0.0.0.0:9797
#HTTP Basic Auth
web_user : admin
web_password : admin

# if set log_path, the sql log will write into log_path/sql.log,the system log
# will write into log_path/sys.log
#log_path : /Users/flike/log

# log level[debug|info|warn|error],default error
log_level : debug

# if set log_sql(on|off) off,the sql log will not output
log_sql: on
 
# only log the query that take more than slow_log_time ms
#slow_log_time : 100

# the path of blacklist sql file
# all these sqls in the file will been forbidden by kingshard
#blacklist_sql_file: /Users/flike/blacklist

# only allow this ip list ip to connect kingshard
# support ip and ip segment
#allow_ips : 127.0.0.1,192.168.15.0/24

# the charset of kingshard, if you don't set this item
# the default charset of kingshard is utf8.
#proxy_charset: gbk

# node is an agenda for real remote mysql server.
nodes :
- 
    name : node1 

    # default max conns for mysql server
    max_conns_limit : 32

    # all mysql in a node must have the same user and password
    user :  root 
    password : zhongjin

    # master represents a real mysql master server 
    master : 127.0.0.1:3306

    # slave represents a real mysql salve server,and the number after '@' is 
    # read load weight of this slave.
    #slave : 192.168.59.101:3307@2,192.168.59.101:3307@3
    down_after_noalive : 32
# schema defines sharding rules, the db is the sharding table database.
schema_list :
-
    user: root
    nodes: [node1]
    default: node1
    shard:
    -
-
    user: kingshard
    nodes: [node1]
    default: node1
    shard:
    -

登陆命令:

mysql -ukingshard -pkingshard -h127.0.0.1 -P9696

客户端登陆返回:

ERROR 1045 (28000): Access denied for user 'kingshard'@'127.0.0.1:57212' (using password: Yes)

大大看到的话帮忙看看呗

@isoleo
Copy link

isoleo commented Nov 12, 2020

我也遇到了windows 可以 mac 不行。。。

@coolboyPT
Copy link

Did you fix this error? how do you do ? I also have such an error ~

@pigjj
Copy link

pigjj commented Feb 10, 2021

这里是因为mysql-workbench是采用 mysql.h连接数据库. 这个 kingshard 是不支持的, 原因在于协议. 使用带有 boost 的 xapi kingshard 是支持的. 如果有必须使用 mysql.h的, maxscale 是个不错的选择

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants