Warning About Ssl Connection When Connecting to MySQL Database

MySQL Workbench SSL connection error: SSL is required but the server doesn't support it

This answer helped me in Workbench 8.0
https://dba.stackexchange.com/a/303329

Basically, create new connection using the advanced tab by entering "useSSL=0" in the 'Others' tab.

Advanced tab, then Others field

How to disable WARN when connecting to SQL database in Java

Try to use the useSSL=false in the connection string

Example:

jdbc:mysql://xxxxxxx:3306/xxxx?autoReconnect=true&useSSL=false

EDIT:

I had issue today 11/20/2019 while connecting mysql version 8.0.12 using java mysql driver (com.mysql.cj.jdbc.Driver, 8.0.18) and got following error

Exception in thread "main" java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed

I had to add allowPublicKeyRetrieval=true to connection string to fix the connection issue.

Updated this answer because its related issue :)

SQL Ant Task: WARN: Establishing SSL connection without server's identity verification is not recommended

How about this:

<sql
url="jdbc:mysql://mysql.box.lan:3306/mydb"
userid="my-user"
password="xxx"
driver="com.mysql.jdbc.Driver"
onerror="continue"
showWarnings="false"
delimiter=";"
encoding="UTF-8">
<connectionProperty name="useSSL" value="false" />
<connectionProperty name="verifyServerCertificate" value="false" />
<connectionProperty name="autoReconnect" value="true" />
</sql>

I'm guessing that ant doesn't parse the connection url properties/doesn't use them for connecting. This seems like a "logical" thing to try by using connectionProperty to set the individual values

https://ant.apache.org/manual/Tasks/sql.html



Related Topics



Leave a reply



Submit