How Tableau Connects to MySQL Using SSL

When connecting to MySQL, Tableau uses a set of its own drivers that provide capabilities specific to a MySQL data connection. However, Tableau does not inherently support SSL connections to MySQL.
To connect to MySQL using an SSL connection, you can try either of the following options:
  • Create a TDC file that appends connection string arguments to the default Tableau connection to MySQL.A TDC file can work well for specific purposes such as this, when using it is preferable to using the generic ODBC driver. If you want to try this option, make sure you read the caveats that are described in this article.
  • Connect through the ODBC driver for MySQL, using the latest supported driver version and configuring it for SSL.
Both options assume that you have obtained the SSL certificate and can access the files for it.

Create a TDC file

A TDC file contains customizations in the data connection to a particular data source. In this case, it contains string arguments that are appended to the default connection created by Tableau to MySQL.
You can include these string arguments in the TDC file as plain text, or you can specify the names of the .pem files that contain the SSL certificate information.

Step 1

Open a new document in a plain text editor, such as Windows Notepad.

Step 2

Copy the information from either of the samples provided below, paste it into your text file, and modify the information as appropriate for your certificate and data connection.

Step 3

Save the file with a .tdc extension—for example, mysql-ssl.tdc—and place it in the appropriate location for your Tableau product:
Tableau Desktop: Documents\My Tableau Repository\Datasources
Tableau Server: Program Files\Tableau\Tableau Server\\bin

Step 4

Restart any Tableau products that are running, including stopping and starting the server.
After you implement the TDC file, Tableau log files will indicate that the MySQL connections are using the additional connection string parameters you specified.
Note In the TDC file samples, the version is an internal file format that is not related to Tableau product version. Include the version attribute as shown in the sample.

SAMPLE TDC FILE WITH ARGUMENTS AS PLAIN TEXT






  

SAMPLE TDC FILE THAT SPECIFIES FILE-SYSTEM FILES

< ?xml version='1.0' encoding='utf-8' ?>
  
  
  
  
    
  

  

CAVEATS TO USING A TDC FILE

The TDC file applies the SSL parameters to all connections using the MySQL connector. This may cause problems if you connect to servers that do not support SSL.
TDC files require careful hand editing, and they are outside the scope of what Tableau Support can assist you with. They also introduce a manual step that you must perform on each machine (including Tableau Server, if applicable).
Despite these caveats, using the TDC file, if it works for your environment and for the purpose of enabling SSL on MySQL connections, is preferable to using the generic ODBC driver.

Connect through the ODBC driver for MySQL

To set up your Tableau product to connect to MySQL using SSL, you complete the following steps:
  • Independent of your Tableau product, obtain the latest Connector/ODBC driver for MySQL and place your certificate files in the appropriate location.
  • For your Tableau product, customize driver settings to add your SSL certificate information.
For Tableau Desktop or Tableau Server, you must perform the procedure on the machine on which that product is installed.
Important: Tableau does not support SSL connections to any data source. SSL connection to MySQL as described here is a capability of the MySQL ODBC driver.

Obtain the Connector/ODBC driver and arrange certificate files

Complete these steps for Tableau Desktop or Tableau Server.

Step 1

Download and install the 32-bit Connector/ODBC driver from the Downloads area of the MySQL website.

Step 2

On the Tableau computer, create a folder structure for the certificate files, for example:
C:\Program Files (x86)\Tableau\ MySQLSSL

Step 3

Move your existing SSL certificate and certificate key files to the MySQLSSL folder you created in the previous step.

Configure the driver for Tableau Desktop

Configure the driver after you complete the steps in the Obtain the Connector/ODBC driver and arrange certificate filessection above.

Step 1

Open Tableau Desktop, and select Data > Connect to Data > Other Data Sources (ODBC) > Next.

Step 2

In the Generic ODBC Connection dialog box, select Driver.

Step 3

From the Driver drop down menu, click MySQL ODBC 5.1 Driver, and then click the Connect button. The MySQL Connector/ODBC Data Source Configuration dialog box displays.

Step 4

Click Details >>, and select the SSL tab.

Step 5

Complete the information in the tab, ensuring that you point both the SSL key file and the SSL certificate file to theMYSQLSSL folder you created earlier in this procedure, and then click OK.

Configure the driver for Tableau Server

Configure the driver after you complete the steps in the Obtain the Connector/ODBC driver and arrange certificate filessection above.

Step 1

Select Windows Start > Control Panel, and then select System.

Step 2

Select Administrative Tools, select Data Sources (ODBC), and then select the System DSN tab.

Step 3

Click Add, select the MySQL driver, and then click Finish.

Step 4

In the MySQL Connector/ODBC Data Source Configuration dialog box, click Details, and then select the SSL tab.

Step 5

Complete the information in the tab, ensuring that you point both the SSL key file and the SSL certificate file to theMYSQLSSL folder you created earlier in this procedure, and then click OK.