Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: The support homepage carousel is not displaying. We are working toward a resolution.

Qlik Talend Product: MySql jdbc connection error "Public Key Retrieval is not allowed"

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
wei_guo
Support
Support

Qlik Talend Product: MySql jdbc connection error "Public Key Retrieval is not allowed"

Last Update:

Aug 16, 2024 2:55:29 AM

Updated By:

Xiaodi_Shi

Created date:

Aug 16, 2024 2:55:59 AM

Problem

When connecting to a MySQL database via JDBC, there will occur below connection error message from TAC or Talend  tMysqlConnection, tMysqlInput and tMysqlOutput components.

java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed

Root Cause

The error message java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed typically occurs when you're trying to connect to a MySQL database using JDBC and the connection URL is not correctly configured to allow public key retrieval for SSL connections. This is a regular setting when using MySQL 8.0+ with certain security configurations.

 

Resolution 

Add client option to your connection URL mysql-connector allowPublicKeyRetrieval=true to allow the client to automatically request the public key from the server.

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

 

Environment

Talend Studio  

Talend Administration Center  

 

Labels (2)
Contributors
Version history
Last update:
‎2024-08-16 02:55 AM
Updated by: