You should add client option to your mysql-connector allowPublicKeyRetrieval=true
to allow the client to automatically request the public key from the server. Note that allowPublicKeyRetrieval=True
could allow a malicious proxy to perform a MITM attack to get the plaintext password, so it is False by default and must be explicitly enabled.
you could also try adding useSSL=false
when you use it for testing/develop purposes
example:
jdbc:mysql://localhost:3306/db?allowPublicKeyRetrieval=true&useSSL=false
Related Posts:
- What is a StackOverflowError?
- What is the proper way to handle a NumberFormatException when it is expected?
- Exception in thread “main” java.util.NoSuchElementException
- getting error HTTP Status 405 – HTTP method GET is not supported by this URL but not used `get` ever?
- JavaFX – Exception in Application start method?
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- JavaFX – Exception in Application start method? [duplicate]
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- Given final block not properly padded
- Can’t find mysqladmin on Mac OSX 10.6.8
- What is an AssertionError? In which case should I throw it from my own code?
- EOFException – how to handle?
- A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1
- Can I catch multiple Java exceptions in the same catch clause?
- Exception in thread “main” java.util.NoSuchElementException: No line found
- “NoClassDefFoundError: Could not initialize class” error
- unreported exception java.io.FileNotFoundException; must be caught or declared to be thrown
- Exception in thread “main” java.lang.UnsupportedClassVersionError: a (Unsupported major.minor version 51.0)
- “NoClassDefFoundError: Could not initialize class” error
- “NoClassDefFoundError: Could not initialize class” error
- Why do I get an UnsupportedOperationException when trying to remove an element from a List?
- Why do I get “Exception; must be caught or declared to be thrown” when I try to compile my Java code?
- What is difference between Errors and Exceptions?
- Causes of getting a java.lang.VerifyError
- How to create a custom exception type in Java?
- java.sql.SQLException: Access denied for user ‘root’@’localhost’ (using password: YES)
- Exception in thread “main” java.lang.ArithmeticException: / by zero
- Java can’t find file when running through Eclipse
- java.sql.SQLException: No database selected – why?
- FXML Load exception
- StringIndexOutOfBoundsException String index out of range: 0
- Cannot issue data manipulation statements with executeQuery()
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- java.lang.ClassNotFoundException:com.mysql.jdbc.Driver [duplicate]
- Why is a ConcurrentModificationException thrown and how to debug it
- Throwing multiple exceptions in Java
- java.lang.ArrayIndexOutOfBoundsException: 0
- Official reasons for “Software caused connection abort: socket write error”
- How can I read a text file in Android?
- Exception is never thrown in body of corresponding try statement
- How can I catch all the exceptions that will be thrown through reading and writing a file?
- Can’t execute jar- file: “no main manifest attribute”
- What’s the simplest way to print a Java array?
- How to avoid java.util.ConcurrentModificationException when iterating through and removing elements from an ArrayList
expected Error in java Compilation [duplicate] - “Javac” doesn’t work correctly on Windows 10
- How to uninstall Eclipse?
- Error parsing data org.json.JSONException: Value
- String interpolation in Java 14 or 15
- Round a double to 2 decimal places [duplicate]
- How to make a deep copy of Java ArrayList
- What does request.getParameter return?
- DB2 jdbc connection error Connection refused. ERRORCODE=-4499, SQLSTATE=08001
- Automated Python to Java translation
- Implements vs extends: When to use? What’s the difference?
- Ubuntu: OpenJDK 8 – Unable to locate package
- The @ symbol in java
- Getting Keyboard Input
- catDog string problem at Codingbat.com
- What is the difference between String.subString() and String.subSequence()
- Why Maven project is tied to J2SE-1.5 by default?
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Is there a concurrent List in Java’s JDK?
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- Why am I still getting a cannot find Java SE Runtime Environment?
- error: unreported exception FileNotFoundException; must be caught or declared to be thrown
- implicit super constructor Person() is undefined. Must explicitly invoke another constructor?
- java.net.SocketTimeoutException: Read timed out under Tomcat
- How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?
- Double cannot be dereferenced?
- Encrypt Password in Configuration Files?
- Missing method body, or declare abstract in Java
- java code is showing error. ( ‘;’,expected) [closed]
- Java, Simplified check if int array contains int
- Converting a string to an integer on Android
- Error: Generic Array Creation
- How to center the text in a JLabel?
- What is the use of a private static variable in Java?
- Call a Class From another class
- Installing WindowBuilder on Eclipse Neon
- Java: how to initialize String[]?
- Regular Expressions on Punctuation
- How to make a countdown timer in Java
- What is method hiding in Java? Even the JavaDoc explanation is confusing
- Error: class X is public should be declared in a file named X.java
- How to “wait” a Thread in Android
- How to use regex in String.contains() method in Java
- Error: Module not specified (IntelliJ IDEA)
- Checking letter case (Upper/Lower) within a string in Java
- How to swap String characters in Java?
- Exception in thread “main” java.net.ConnectException: Connection refused: connect Socket Programming Java
- Why is there no multiple inheritance in Java, but implementing multiple interfaces is allowed?
- Resource leak: ‘in’ is never closed
- Multiple assignment at once in java
- -XX:MaxPermSize with or without -XX:PermSize
- Decompile .smali files on an APK [duplicate]
- How to get rows and columns count of a 2D array in Java?
- Difference between volatile and synchronized in Java
- How can I design a class named allergy?
- How to know if a given string is substring from another string in Java