Skip to content

Authentication method 'caching_sha2_password' failed #1559

Open
@kevinHMS

Description

@kevinHMS

Issue:
Unable to connect to the mysql server, errorMsg: Authentication method 'caching_sha2_password' failed. Either use a secure connection, specify the server's RSA public key with ServerRSAPublicKeyFile, or set AllowPublicKeyRetrieval=True.

MySQL version: 8.0.40

More network trace information as below:

  1. From the first MySQL protocol packet from client to server: the client Auth Plugin is: mysql_native_password

Image

  1. Then from server end, it sends following response: The server requests the client to use authentication as: caching_sha2_password.

Image

  1. And the client sent a response back and server started to do caching_sha2_password auth.

Image

  1. Then we can see the server responded error

Image

In the older version which is connecting to the same My SQL server, after server sends the perform full authentication packet, we can see client sends the request_public_key request and then got the public key from server end.

Image

Please help to check why the behavior is different.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions