MySQL
You can generate data from an edge device, then connect and store the data in the MySQL sample database using the DB-MySQL connector. Data is collected from the selected device.
See the MySQL 8.0 Reference Manual for more information.
Step 1: Add Device
Follow the steps to Connect a Device. The device will be used to store tags that will be eventually used to create outbound topics in the connector. Make sure to select the Enable Data Store check box.
For this use case, select the Simulator device and Simulator (Gen1) driver, and use the name Product A.
Step 2: Add Tags
After connecting the device in Belden Horizon Data Operations, you can Add Tags to the device. Create tags that you want to use to create outbound topics for the connector.
For this use case, add two tags with the following details.
- Name: Select int-integer.
- Value Type: Select int.
- Tag Name: Enter temp.
- Polling Interval: Enter 1.
- Address: Enter 0.
- Name: Select float-float.
- Value Type: Select float.
- Tag Name: Enter pressure.
- Polling Interval: Enter 1.
- Address: Enter 1.
Step 3: Add MySQL Marketplace Application
Note: The version used in this use case for MySQL version is 8.0.
To add the MySQL Marketplace Application:
- In Belden Horizon Data Operations, navigate to Applications > Marketplace.
- Click Marketplace List and select Default Marketplace Catalog.
- Click the MySQL application tile.
- From the Installation script version drop-down list, select latest.
- Configure the following parameters.
- Name: Enter MySQL.
- Database: Enter sample.
- User: Enter user.
- Password: Enter the user password.
- MySQL password: Enter the same value as the Password parameter.
- Click Launch.
- Navigate to Applications > Catalog Apps. The MySQL application appears, pulls the image, and then starts the application. The MySQL application shows as running.
- Navigate to Applications > Containers. The MySQL application Container is running.
- Copy the IP address for the MySQL application.
Step 4: Add the DB - MySQL Connector
Follow the steps to Add a Connector and select the DB - MySQL provider.
Configure the following parameters.
- Name: A recognizable name to identify the connector.
- Hostname: Paste the IP address you copied in Step 3.
- Port: The MySQL Server port. The default value is 3306.
- Username: Enter user.
- Password (Optional): Enter the user password.
- Database: Enter sample.
- Table: Enter test_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 Conigure 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.
- 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 Belden Horizon Data Operations when cloud providers are online.
Step 5: Enable the DB - MySQL Connector
To enable the connector:
- Return to the Belden Horizon Data Operations Integration browser tab.
Step 6: Create Topics for MySQL 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.
To create outbound topics:
- Click the connector tile. The connector Dashboard appears.
- Click the Topics tab.
After importing the tags, click the toggle in the connector tile to restart the connection.

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

Step 8: Make Queries in the Container Terminal
To make queries in the container terminal:
- In Belden Horizon Data Operations, navigate to Applications > Containers.
- From the MySQL container terminal, enter mysql -u user -p and press ENTER. Enter password: appears.
- Enter your user password, and then press ENTER. Welcome to the MySQL monitor appears.
- Enter show databases; and press ENTER. The database name appears.
- Enter use sample; and press ENTER. Reading table information for completion of table and column names appears in the console.
- Enter show tables; and press ENTER. The table names for sample appear.


