KNOWLEDGE BASE

How to Set SSL When Connecting to MySQL in Tableau Prep


Published: 04 Feb 2022
Last Modified Date: 07 Nov 2023

Question

How to set SSL when connecting to MySQL in Tableau Prep?
SSL checkbox did not appear in the login window in Tableau Prep.
 

User-added image

 

However, the "Require SSL" option appears in Tableau Desktop.

 

User-added image

Environment

  • Tableau Prep Builder
  • MySQL

Answer

SSL is not supported in Tableau Prep.
Consider the possible workaround: Use an xml TDC file to set SSL.

The steps are as follows:
1. Close Tableau Prep, create a text file with the following contents, and rename the file to "mysql.tdc". (Bolded parts need to be changed).
    Note1: The "version" is the version of the MySQL driver installed on your terminal.
    Note2: The "value" is the SSL information you need to add.

========
<?xml version='1.0' encoding='utf-8' ?>
<connection-customization class='mysql' enabled='true' version='8.0.27'>
    <vendor name='mysql' />
    <driver name='mysql' />
    <customizations>    
        <customization name='odbc-connect-string-extras' value='SSLKEY={C:\MySQL_SSL\client-key.pem};SSLCERT={C:\MySQL_SSL\client-cert.pem};SSLCA={C:\MySQL_SSL\ca-cert.pem}' />
    </customizations>
</connection-customization>
========

2. Move "mysql.tdc" to "C:\ Users\<UserName>\Documents\My Tableau Prep Repository\Datasources".

3. Open Tableau Prep and connect to MySQL.
    Note: Tableau does not test or support .tdc files. 

Did this article resolve the issue?