MySQL Connections
You can create connections to one or more MySQL databases from the Designer Cloud Powered by Trifacta platform. For more information on MySQL, see https://www.mysql.com/.
Tip
You can create connections to databases of this type that are managed by your enterprise or are hosted in cloud infrastructure. The required configuration is the same. The cloud-based version is labeled on Amazon RDS. In the Create Connection dialog, you can search for that term.
Supported Versions: 5.7 and 8.0 Community
Supported Environments:
Operation | Designer Cloud Powered by Trifacta Enterprise Edition | Amazon | Microsoft Azure |
---|---|---|---|
Read | Supported | Supported | Supported |
Write | Supported | Supported | Supported |
Prerequisites
Warning
If the Alteryx databases are hosted on a MySQL server, do not create a connection to this database.
If you haven't done so already, you must create and deploy an encryption key file for the Trifacta node to be shared by all relational connections. For more information, see Create Encryption Key File.
Acquire MySQL Java driver
The MySQL Java driver is not packaged with the Designer Cloud Powered by Trifacta platform installer. This driver must be downloaded and installed on the Trifacta node. The installation directory on the Trifacta node is the following:
/opt/trifacta/services/data-service/build/dependencies
For more information on acquiring the driver, see Install Databases for MySQL.
Configure
To create this connection:
In the Import Data page, click the Plus sign. Then, select the Relational tab. Click the MySQL card.
You can also create connections through the Connections page.
See Connections Page.
For additional details on creating a MySQL connection, see Relational Access.
Modify the following properties as needed:
Property | Description |
---|---|
Host | Enter your fully qualified hostname. Example: mysql-server.example.net |
Port | Set this value to |
Connect String Options | Insert any additional connection parameters, if needed. See below. |
User Name | Username to use to connect to the database. |
Password | Password associated with the above username. |
Test Connection | After you have defined the connection credentials type, credentials, and connection string, you can validate those credentials. |
Advanced options: Default Column Data Type Inference | Set to |
Advanced options: Enable SSH Tunneling | This feature is not available. |
Connection Name | Display name of the connection |
Connection Description | Description of the connection, which appears in the application. |
Connection URL
The properties that you provide are inserted into the following URL, which connects the Designer Cloud Powered by Trifacta platform to the connection:
jdbc:mysql://<host>:<port>/<database><connect-string-options>
The connect string options are optional. If you are passing additional properties and values to complete the connection, the connect string options must be structured in the following manner:
&<prop1>=<val1>&<prop2>=<val2>...
where:
<prop>
: the name of the property<val>
: the value for the property
delimiters:
&
: all additional property names must be prefixed with an ampersand (&
).=
: property names and values must be separated with an equal sign (=
).
The following connect string options are specified by default.
Note
These options should not be overridden or modified.
The following connect string option requires the driver to use cursor-based fetching to retrieve rows.
useCursorFetch=true;
You can insert the following connection string option to enable secure (TLS) connectivity with the MySQL server. Please note the TLS version numbers in the string listed below:
&enabledTLSProtocols=TLSv1,TLSv1.1,TLSv1.2
When data is imported from MySQL, the connector performs time zone adjustments to imported Datetime values.
Tip
By default, the MySQL driver adjusts the imported data to be represented in the time zone into which it is being read. If you are located in GMT -08:00, all data is rendered that your Alteryx user reads into the application through the MySQL connector is adjusted to this time zone.
These adjustments are performed in either of the following cases:
The MySQL server is configured with a canonical time zone that is recognizable by Java (for example, Europe/Paris, Etc/GMT-5, UTC, etc.).
The server's time zone is overridden by setting the Connector/J connection property serverTimezone.
In the latter case, you can specify the override time zone to apply as part of the connection string:
&serverTimezone=Europe/Paris
The following value sets the time zone of imported data to be UTC:
&serverTimezone=UTC
For more information on this behavior, see https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-other-changes.html.
Driver Information
This connection uses the following driver:
Driver name:
com.mysql.cj.jdbc.Driver
Driver version:
8.0
Driver documentation:https://dev.mysql.com/doc/connector-j/8.0/en/
Create via API
This connection can also be created using the API.
Type:
jdbc
Vendor:
mysql
For more information, see https://api.trifacta.com/ee/9.7/index.html#operation/createConnection
Troubleshooting
Error message | Description |
---|---|
1042 - ER_BAD_HOST_ERROR | Unable to connect to host. Please verify the host and port values. |
1045 - ER_ACCESS_DENIED_ERROR | Credentials failed to connect. Please verify your credentials. Tip Click the Test Connection button to verify that your credentials are working properly. |
Error: zero date value prohibited | Set the following option in the connect string options: zeroDateTimeBehavior=convertToNull |
Prepared statement needs to be re-prepared. | Database Cursor is not compatible with PREPARED statements in MySQL. The fix is to set the following in the Connect String Options: useCursorFetch=false |
SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) | SSL ciphers need to be enabled. For more information, see "Enable TLS (SSL)" above. |
For more information on error messages for this connection type, see https://dev.mysql.com/doc/refman/8.0/en/error-handling.html.
Use
For more information, see Database Browser.
Data Conversion
For more information on how values are converted during input and output with this database, see MySQL Data Type Conversions.