• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
23 views

Problem :

I am getting bellow error while I try to connect MySql database with Java using connector 8.0.11

java.sql.sqlnontransientconnectionexception: public key retrieval is not allowed

by (6.9k points)  

1 Answer

0 votes

Solution:

I also faced above error , in my case it was actually due to the wrong username and password. 

Solving the issue: 

a. Go to the line DriverManager.getConnection("jdbc:mysql://localhost:3306/?useSSL=false", "username", "password"); 

b.The fields username and password must be wrong. You must enter the username and password which you use to start your mysql client. 

Further Readings:

https://github.com/speedment/speedment/issues/621

by (22.5k points)  
edited by
...