Skip to content

Commit

Permalink
Tuning error logic to fix ruby mysql auth error
Browse files Browse the repository at this point in the history
  • Loading branch information
fulghum committed Nov 22, 2024
1 parent 400adf5 commit 761846e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/mysql/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ func (l *Listener) handle(ctx context.Context, conn net.Conn, connectionID uint3
//
// The latter case happens for example for MySQL 8.0 clients until 8.0.25 who advertise
// support for caching_sha2_password by default but with no plugin data.
if err != nil || len(clientAuthResponse) == 0 {
if err != nil || (len(clientAuthResponse) == 0 && clientAuthMethod == CachingSha2Password) {
l.handleConnectionError(c, "auth server failed to determine auth method")
if err != nil {
// The client will disconnect if it doesn't understand
Expand Down

0 comments on commit 761846e

Please sign in to comment.