rdbMySQL-MySQLDatabase

This component models a MySQL relational database, which is an Oracle Corporation relational database management system (RDBMS) that requires a GPL or proprietary license. It is available in the rdbMySQL palette.

Note: The rdbMySQL-MySQLDatabase component was tested with the MySQL connector version “mysql-connector—java–8.0.24”. Use of earlier versions of this connector is not recommended and not supported.
Figure 1. MySQLDatabase properties


You access the properties to configure the driver for this database by expanding Config > Drivers > RdbmsNetwork, and double-clicking the MySQLDatabase node.

In addition to the standard properties (Status, Enabled, Fault Cause, Health and Alarm Source Info), these properties support this component.

PropertyValueDescription
Host AddressIP address
Sets the IP address or hostname of the computer platform where the database resides. A Dialup selection option is available, if required. This property does not apply to the MySQL device.
Use Encrypted Connectiontrue or false (default)
Indicates if the connection between the station and the database is secure (true) or not secure (false). To ensure that your system cannot be hacked, leave this property set to true. Change it only if your database does not support data encryption.
Privileged Username Nametext
Defines the user name used to log in to the database.

Login credentials must provide sufficient database privileges to allow you to perform one or more (depending on database type) of these commands: CREATE TABLE, CREATE INDEX, CREATE SEQUENCE

Privileged Passwordtext
Defines the password required to log in to the database. The Confirm property must be an exact match to the Password property.
Workeradditional propertiesThe “rdb-RdbmsWorker” topic documents these properties.
Export Modedrop-down list
Specifies how histories are exported to the specified database.

By History Id exports one table per History Id. This is the default value setting.

By History Type exports one table per History Type. This option may make the data easier to query once exported.

Use Unicode Encoding Schemetrue or false (default)
Creates history table schemas with the Universal character set Transformation Format (UTF-8) or Unicode data types for string-valued columns to store Asian character sets.

false maintains backward compatibility with legacy history export mechanisms.

true enables the NVARCHAR data type for any column in a table that expects string data.
Note: An Update Wizard is available to upgrade existing databases to support Unicode.
Timestamp Storagedrop-down list
Exports or updates history timestamps to Coordinated Universal Time (UTC) enabling the export of history records from different timezones into a common database and be chronologically correct and independent of any specific source timezone characteristics. In other words, exported histories show the timestamp data from where the history is actually stored, making useable histories with a consistent timestamp.

Dialect Default maintains compatibility with legacy history export mechanisms. This property does not apply to the MySQL device.

Local Time Stamp applies to Orion databases only and does not apply to history exports.

Utc Timestamp exports all subsequent histories with UTC timestamps.

Utc Millis applies to Orion databases only and does not apply to history exports.
Note: An Update Wizard is available to upgrade existing databases to support Unicode.
PointsfolderHolds all points.
Sql Scheme Enabledtrue or false (default)
Permits (true) and prohibits (false) the use of ORDs that contain sql:.

If a BFormat contains sql:, users can directly query the database bypassing framework access control and make direct changes to the database. This is a security risk. Best security practice sets this property to false.

Rdb Security Settingsadditional propertiesThe “rdb-RdbSecuritySettings” topic documents these properties.
Tls Min Protocoldrop-down menu
Selects the minimum TLS protocol that can be negotiated when establishing encrypted communications with a database server.
Verify Subject In Certificatetrue (default) or false
If set to true, the Rdbms driver verifies that the Subject present in the server’s certificate matches an expected value. The value used for the comparison to the Subject in the server’s certificate is specific to each Rdbms device type.
Database Nametext
Provides the name of the database.
Portnumber (defaults to 3306)
Specifies the port number to use when connecting with the database. Defaults are:

HsqlDbDatabase, no port specified because this rdb is for local database use only:

MySQLDatabase: 3306

OracleDatabase: 1521

SqlServerDatabase: 1433

Historiesadditional properties“rdbMySQL-MySQLHistoryDeviceExt” documents these properties.
Extra Connection Propertiesnormally left blank; if used takes the format: parameter1=value1;parameter2=value2;...etc.
Configures additional properties that are not required for a normal connection to the database. The driver passes this information in plain text to the database.

You can set certain configuration properties as part of the extra connection properties of the RDBMS database to optimize the batch processing of the insert queries, specifically the history export queries.

To enable the JDBC driver of a MySQL Server to pack as many queries as possible into a single network packet, lowering network overhead, set rewriteBatchedStatements set to true.

My Sql Server Certdrop-down list
Defines the database server certificate for TLS secure communication.

If the field is empty, no Subject Identity is checked. It is implied that the certificate presented by the MySQL server is already trusted. Otherwise, the Subject’s Common Name (CN) from the certificate alias configured in the My Sql Server Cert property is used.

Non-Privileged Connection Poolstatus (active or inactive); additional propertiesAllows you to configure an additional account for operations that do not require privileges to modify database schema objects (as of Niagara 4.15.

Actions

This component supports the following actions:

  • Ping sends a message to a network object (device, database, etc). The message provokes a response, which indicates the current state of the object.

  • Allow Dialect Modifications makes the Timestamp Storage property writable within the RdbmsNetwork Update Wizard. When the wizard converts a database to UTC (Coordinated Universal Time), it sets this property to read-only.