close

[Solved] javax.net.ssl.SSLHandshakeException: No appropriate protocol

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to connect MySql to my JAVA but I am facing following error javax.net.ssl.SSLHandshakeException: No appropriate protocol in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How This Error Occurs ?

I am trying to connect MySql to my JAVA but I am facing following error.

com.zaxxer.hikari.pool.HikariPool: HikariPool-1 – Exception during pool initialization. ! javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

How To Solve javax.net.ssl.SSLHandshakeException: No appropriate protocol Error ?

  1. How To Solve javax.net.ssl.SSLHandshakeException: No appropriate protocol Error ?

    To Solve javax.net.ssl.SSLHandshakeException: No appropriate protocol Error Just add useSSL=false in your connecting string. Just like this: jdbc:mysql://<host>:<port>/<dbname>?useSSL=false Now, Your error should be solved.

  2. javax.net.ssl.SSLHandshakeException: No appropriate protocol

    To Solve javax.net.ssl.SSLHandshakeException: No appropriate protocol Error You just need to add enabledTLSProtocols=TLSv1.2 configuration property in your connecting string. Just like below: jdbc:mysql://<host>:<port>/<dbname>?enabledTLSProtocols=TLSv1.2 Now, Your issue must be resolved.

Solution 1: add enabledTLSProtocols=TLSv1.2 configuration property

You just need to add enabledTLSProtocols=TLSv1.2 configuration property in your connecting string. Just like below.

jdbc:mysql://<host>:<port>/<dbname>?enabledTLSProtocols=TLSv1.2

Now, Your issue must be resolved.

Solution 2: Add useSSL to false

Just add useSSL=false in your connecting string. Just like this.

jdbc:mysql://<host>:<port>/<dbname>?useSSL=false

Now, Your error should be solved.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment