JDBC connection is refused for jdbc mysql.

rohanchouhan22
Tera Contributor

When we try test for Test Credential , it throws an error connect refused for jdbc.

1 REPLY 1

Community Alums
Not applicable

Hi @rohanchouhan22 ,

Option 1

Change the authentication plugin used for the database user connecting MySQL to mysql_native_password. This can be done by creating a new user or altering the existing user on the MySQL Server, with the clause: IDENTIFIED WITH mysql_native_password BY 'new_password'. Refer to the MySQL documentation for CREATE/ALTER user for further details. 

Option 2

If using a MID server to connect to the database, use a different JDBC driver on the MID server. Any MariaDB Connect/J driver 2.5.0 or newer is known to work, as are more recent versions of the official MySQL Connect/J driver. Note that because MID ships with a MariaDB/MySQL driver already, the steps in KB0862383 must be followed to override the default driver. Also note that the caching_sha2_authentication plugin requires either a TLS connection or that the driver be configured to trust the server's RSA key, so additional configuration may be required to connect using TLS.