How-To Guides
Integration Guides

MySQL SSL Integration Guide

9min

Review the following guide for setting up an integration between Litmus Edge and a MySQL database using SSL authentication.

Before You Begin

You will need the following:

  • Access to a MySQL database with SSL authentication.
  • The CA Certificate and any other required authentication parameters to access the database.

You can use the following supported versions:

  • MySQL (4.1+)
  • MariaDB
  • Percona Server
  • Google CloudSQL
  • Sphinx (2.2.3+)

Refer to the following links to learn more:

Step 1: Add Device



Step 2: Add Tags



Step 3: Add the DB - MySQL SSL Connector

Follow the steps to Add a Connector and select the DB - MySQL SSL provider.

Configure the following parameters.

  • Name: Enter a name for the connector.
  • Hostname: Enter the IP address to access the database.
  • Port: The port needed to access the database. The default value is 3306.
  • CA Certificate: Paste or upload the CA certificate associated with the database.
  • Certificate: Paste or upload the SSL certificate.
  • Private Key: Enter or paste the SSL private key.
  • Username: Enter the username to access the database.
  • Password (Optional): Enter the password associated with the username.
  • Database: Enter the database name.
  • Table: Enter a name to create a new table or enter the name of an existing table.
  • Show Mapping: If you want to send data to a custom table, select this check box and unselect Create table. See Work with Tables in SQL Connectors (Create Table and Show Mapping) to learn more. To add key/value pairs for the custom table, see Configure Key/Value Pairs.
  • Create table: If you want to send data to an existing table in the default format, or you want to create a new table in the default format, select this check box and unselect Show Mapping. See Work with Tables in SQL Connectors (Create Table and Show Mapping) to learn more.
  • Commit timeout: Enter the transaction commit timeout in (ms).
  • Max transaction size: Enter the maximum number of messages before a transaction is committed, regardless of timeout parameter.
  • Bulk insert count: To enable this option, enter the number of messages to group together and send as one bulk insert statement. Enabling this option can improve how quickly data is processed when dealing with high volumes of tags.
  • Throttling limit: The maximum number of messages per second to be processed. The default value is zero, which means that there is no limit.
  • Persistent storage: When enabled, this will cause messages to undergo a store-and-forward procedure. Messages will be stored within Litmus Edge when cloud providers are online.
  • Queue Mode: Select the queue mode as lifo (last in first out) or fifo (first in first out). Selecting lifo means that the last data entry is processed first, and selecting fifo means the first data entry is processed first.

Step 4: Enable the Connector

After adding the connector, click the toggle in the connector tile to enable it.

Document image


If you see a Failed status, you can review the Connector Logs and relevant error messages.

Step 5: Create Topics for Connector

You will now need to import the tags created in Step 2 as topics for the MySQL connector. The topics will be created as outbound topics.



After adding all required topics, navigate to the Integration overview page and ensure the connector is not disabled and still shows a CONNECTED status.

Step 6: Enable Topics

To enable the topics, return to the Topics tab and click the Enable all topics icon.

Enable all topics icon
Enable all topics icon


Step 7: Make MySQL Queries

You can now verify that you can view data in the MySQL database.

Update the credentials, database name, and table name to your own specific configurations.

To make MySQL queries:

  1. From the MySQL terminal window, enter mysql -u user -p and press ENTER. Enter password: appears.
  2. Enter your user password, and then press ENTER. Welcome to the MySQL monitor appears.
  3. Enter show databases;, and then press ENTER. The database name appears.
  4. Enter use sample;, and then press ENTER. Reading table information for completion of table and column names appears in the console.
  5. Enter show tables;, and then press ENTER. The table names for sample appear.
  6. Enter select * from test_table; , and press ENTER. Data appears from the imported tags for the connector.