MySQL Live Driver Information

Source Properties

When setting up the MySQL data source, you'll be asked to specify…

OptionUse
HostThe host name or IP address of your MySQL server
PortThe port that the MySQL server runs on (normally 3306)
DatabaseThe name of the MySQL database to use
UsernameThe username (with read-only access) to use to connect
PasswordThe password that goes with the above username*
TableThe name of the table to query
Lookup FieldThe field that gives you the 'name' of the value - used to connect a single ARDI property with a single row in your database
Date StampOptional - The name of the date column in your database. If not specified, all rows are inspected. See the 'Date Stamps' below for more detail.
ValueThe name of the column that contains the value you are looking for
FilterOptional - An additional filter to add to the SQL query

* Note that this password is visible to all administrative users, which is why you should ensure that the user account is read only and can not make changes to the underlying database.

These are the options that appear when you link a property to a text data source…

OptionUse
LookupThe value of the lookup column

How It Works

As an example, let's look at a simple database layout…

DateNameValue
2016-01-01 12:15ALPHA_TEMP24.04
2016-01-01 12:15BETA_PRESS2891
2016-01-01 12:15BETA_TEMP16.29
2016-01-01 11:15ALPHA_TEMP29.04
2016-01-01 11:15BETA_PRESS2231
2016-01-01 11:15BETA_TEMP20.29

If we wanted to connect to the latest values in this table, we would set the columns of our data source so that…

  • Lookup Field = Name
  • Value = Value
  • Date = Date

Then, if we had an asset called “Beta”, when we linked the “Pressure” property to data, we would set…

  • Lookup = BETA_PRESS

The driver checks for the Lookup Field that matches the Lookup of the data link and returns the value in the Value field.

So in the case above, the driver would check the first three rows, and set the pressure of the Beta asset to 2891.

Date Stamps

The fastest scenario is if you have a 'latest values' table that contains only the most recent data.

There is one case to be aware of - if your recordings aren't synchronised (ie. they aren't all recorded simultaneously to the database) - it may take a little while for your driver to get all of the data after being restarted. On restart, the driver may capture only the most recent data, which may not include some of your points. You may need to wait until new data arrives for the information to be captured.

This driver doesn't need to know the style or timezone of your date stamps.