• Register
0 votes

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

6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes


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:


9 7 4
38,600 points

Related questions

0 votes
1 answer 174 views
Solve this problem.
asked Jan 1 TeamScript 13.5k points
0 votes
2 answers 84 views
Problem : I am getting bellow error while trying to execute JDBC code java.sql.sqlexception: operation not allowed after resultset closed
asked Nov 1, 2019 peterlaw 6.9k points
0 votes
1 answer 21 views
Problem: I tried my best to solve this situation but it didnt work! any help! Typeerror: catching classes that do not inherit from baseexception is not allowed.
asked Mar 7 Wafa Abu Yousef 6.1k points
0 votes
1 answer 2.6K views
Problem : When I try to run the below code: j=0 while j<5: j=j+1; try: MySellSta=client.get_order(symbol=MySymb,orderId=MySellOrderNum,recvWindow=MyDelay) except client.get_order as mye: print ("This is the error message!{}".format(j)) #End while I got the following error ... #End while The result is that it ignores my error and go to my next while but I want to catch my error and print my error.
asked Dec 27, 2019 alecxe 7.5k points
0 votes
1 answer 4 views
Problem: What are the effects of exceptions on performance in Java?
asked Mar 9 ummesalma 24.5k points
1 vote
1 answer 4 views
Problem: Can anyone tell me the solution of this problem? java.sql.sqlnontransientconnectionexception: client_plugin_auth is required
asked Mar 25 MUHAMMAD MUNEEB 82.5k points
0 votes
1 answer 7 views
Problem: Any ideas on what I need to fix the error: could not find or load main class main caused by: java.lang.classnotfoundexception: main?
asked Mar 27 ashik 11.2k points
0 votes
1 answer 1.1K views
Problem : I want to input some of the details about student to my program. But when I press a save button its giving me the below listed exception error: "Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet."
asked Jan 31, 2020 jwilliam 3.9k points
0 votes
1 answer 43 views
Problem : I am new to C#. I want to know how can I get the value of a given key in a following exception which I am currently facing in C# in a way it affects all the generic classes? Below is the exception which I am currently facing. "The given key was not present in the dictionary." How to fix above exception.
asked Feb 24, 2020 mphil 2.3k points
0 votes
1 answer 3 views
Problem: Please kindly tell me the solution of it, java.net.socketexception: broken pipe (write failed)
asked Apr 2 Ifra 24.4k points