KB-2141 Unable to add MySQL data source from Admin Console due to "Failed datasource validation" and SSL error

Symptoms

Users are unable to add a MySQL data source from the Admin Console. The following error is printed in the application server log:

ERROR com.appiancorp.expr.server.scriptingfunctions.DataSourceFunctions - Failed datasource validation
com.appiancorp.rdbms.datasource.DataSourceValidationException: java.sql.SQLException: Cannot create PoolableConnectionFactory (SSL connection is required. Please specify SSL options and retry.)
...
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (SSL connection is required. Please specify SSL options and retry.)
...
Caused by: java.sql.SQLException: SSL connection is required. Please specify SSL options and retry.

Cause

The MySQL data source requires an SSL connection, but the connection string does not specify that SSL should be used.

Action

  1. Append &useSSL=true to the MySQL connection string to require the connection string to use SSL.
  2. If the error still occurs, the database certificate may be self-signed and/or not trusted automatically. Append &useSSL=true&trustServerCertificate=true to the connection string to require the connection to both use SSL and trust the existing certificate.

NOTE: Appending &trustServerCertificate=true to the connection string will cause Appian to automatically trust the database server certificate. This may be required if the server is using a self-signed certificate, but this is not recommended in production environments.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: August 2020

Related
Recommended