• Home
  • Privacy Policy
  • About Us
  • Contact Us
  • sitemap

ITProSpt

Share useful informations about IT

  • Windows
  • Active Directory
  • Chrome
  • Office
  • Outlook
  • Mobile
  • ↻ More
    • Gaming
    • VLC
    • Software
    • Gmail
    • Login Portals
    • QA
    • Education

How Can We Address This Issue “Exception in thread “main” java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed at”?

March 19, 2022 by thepros

Java is a modern, high-level, object-oriented, secure, and powerful programming language and is a Platform. The Java programming language was originally developed by Sun Microsystems, initiated by James Gosling, and released in 1995.

When you run the project with Java, you will see the message “Exception in thread “main” java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed at“.

This software mistake has been so common that it could occur to anyone. As a result, how did it happen, and can it be solved? Let’s discover together to find out the best methods for this issue.

Reason For The Error: “Exception in thread “main” java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed at”

When you are connecting the Mysql database, you face this error.

Exception in thread “main” java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:108) at

The Top Solution

Approach 1

You can add the allowPublicKeyRetrieval=true client option to your mysql-connector to enable the company to instantly ask the public key out from the server. Also, you should include useSSL=false like in this example.

jdbc:mysql://localhost:3306/db?allowPublicKeyRetrieval=true&useSSL=false
Approach 2

If you’re using DBeaver, you can use this setting.

  • Initially, right-click on the connection and select “Edit Connection.”
  • Select “Edit Driver Settings” here on the “Connection Settings” display (main screen).
  • Select “Connection Properties” from the menu.
  • Right-click a “user properties” section and select “Add new property.”
  • Add the following two properties: “useSSL” and “allowPublicKeyRetrieval.”
  • By double-clicking here on the “value” column, you can change their value systems to “false” and “true.”

Conclusion

Java is a powerful object-oriented programming language and one of today’s most widely used platforms. Some of the games, applications, and software on both computers and phones are created by Java.

If the failure “Exception in thread “main” java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed at” persists, follow the steps below to resolve it.

When you need support or have basic Java questions, a large team of studies is always ready to aid. At last, we desire all subscribers a wonderful day full of new ideas.

Post Views: 193

Related Posts:

  • Best Ways To Fix Class Has Been Compiled By A More Recent Version Of The Java Environment
    Best Ways To Fix Class Has Been Compiled By A More Recent…
  • Definition about Basic Math Functions.
    Definition about Basic Math Functions.
  • Tips On Solving The Problem “Error:java: invalid target release: 11”
    Tips On Solving The Problem “Error:java: invalid target…
  • Tips On Solving The Error “Error:java: error: release version 5 not supported in IntelliJ IDEA Ultimate”
    Tips On Solving The Error “Error:java: error: release…
  • Main has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    Main has been compiled by a more recent version of the Java…
  • How To Fix General Error During Semantic Analysis: Unsupported Class File Major Version 60
    How To Fix General Error During Semantic Analysis:…
  • Tips On Fixing The Error “java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7”
    Tips On Fixing The Error “java.lang.NoClassDefFoundError:…
  • Tricks For You: Failed To Execute Goal Org.Apache.Maven.Plugins:Maven-Resources-Plugin:3.2.0:Resources
    Tricks For You: Failed To Execute Goal…

Filed Under: Java

Recent Posts

  • Top Ways To Create A User-Friendly Online Property Search For Your Real Estate Clients
  • List Education Websites for Students, providing a variety of materials and completely free
  • Simple solution to correct the requests.exceptions.ConnectionError: (‘Connection aborted.’ RemoteDisconnected(‘Remote end closed connection without response’)) issue 

Categories

Copyright © 2022 · Itprospt.com