Skip to content

Commit e6237fb

Browse files
committed
Send using password: NO when no password is used
1 parent 8fd2c2a commit e6237fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (c *Conn) compareSha256PasswordAuthData(clientAuthData []byte, credential C
9090
if credential.Password == "" {
9191
return nil
9292
}
93-
return ErrAccessDenied
93+
return ErrAccessDeniedNoPassword
9494
}
9595
if tlsConn, ok := c.Conn.Conn.(*tls.Conn); ok {
9696
if !tlsConn.ConnectionState().HandshakeComplete {
@@ -129,7 +129,7 @@ func (c *Conn) compareCacheSha2PasswordAuthData(clientAuthData []byte) error {
129129
if c.credential.Password == "" {
130130
return nil
131131
}
132-
return ErrAccessDenied
132+
return ErrAccessDeniedNoPassword
133133
}
134134
// the caching of 'caching_sha2_password' in MySQL, see: https://dev.mysql.com/worklog/task/?id=9591
135135
// check if we have a cached value

0 commit comments

Comments
 (0)