Dbeaver gives public key retrieval is not allowed error.
While connecting to the Dbeaver it will give the public key retrieval is not allowed error as:

Cause: Parameter allowPublicKeyRetrieval
is false. allowPublicKeyRetrieval=true
to allow the client to automatically request the public key from the server.
Resolution: Use the allowPublicKeyRetrieval=true
jdbc:mysql://localhost:3306/db?allowPublicKeyRetrieval=true
In Dbeaver: Go to connection then select the Driver Properties tab and change the allowPublicKeyRetrieval to true.
