Data Logger Suite: Logging and Monitoring

MODBUS to MySQL: Write MODBUS values to the MySQL database

Download a Free Trial Version. It allows you to try all features! Plugins can be downloaded separately here

The configuration process for MySQL is similar to the article "How to write data to MSSQL." Only the main differences are described in this manual.

1. Download and install the 32-bit version of MySQL ODBC Connector (the ODBC driver) for MySQL from

Driver section
Fig. 1 Driver section

2. The structure of a table in the database will look like this:

CREATE TABLE `modbus_data_2` (
  `TIMESTAMP` datetime NOT NULL,
  `ITEM1` varchar(30) DEFAULT NULL,
  `ITEM2` varchar(30) DEFAULT NULL,

If you specify any other data type than String for ITEM1 or ITEM2 in the MODBUS settings, you should create the columns of the corresponding types while creating a table.

3. Create an ODBC data source for your MySQL database.

4 Follow steps #1-9 from the previous tutorial for MS SQL: "Writing MODBUS values to MS SQL."

5. During the binding process, you should consider that the names of the table and its columns are case-sensitive in MySQL.

Copyright © 1999 - 2023, AGG Software.
All rights reserved. Terms of use | Privacy policy