Connecting to MySQL

To connect Ignition to MySQL database

  1. From the Gateway, go to the Configure section.

  2. From the menu on the left, select Databases > Connections.
    The Database Connections page is displayed.

  3. Look for the orange arrow, click on Create new Database Connection....

    images/download/attachments/6033891/image2015-3-2_8_26_47.png

  4. Select the MySQL ConnectorJ driver and click Next.

    images/download/attachments/6033891/image2015-3-2_8_29_51.png

    Database connections in Ignition are powered by JDBC drivers. Ignition ships with drivers for Microsoft SQL Server, MySQL, Oracle, and a few others.

  5. On the New Database Connection page, enter the following information:

    Name: MySQL (use a meaningful name such as MySQL)

    Connect URL: jdbc:mysql://localhost:3306/test (By default MySQL creates an empty database called test)

    images/download/attachments/6033891/image2015-3-2_8_30_33.png

    As you see in the example above, MySQL uses the following Connect URL format:
    jdbc:mysql://hostaddress:3306/database

    Where hostaddress is the address of the machine with MySQL installed, for example: localhost, 192.168.1.1, db-server, etc.
    and database specifies the database schema the connection will target. It's important to understand that a MySQL server can host many database files. The connection will target one database.

  6. To configure the connection, enter the following information:

    Username: root

    Password: mysql (password is what you entered during MySQL server installation, mysql is the password for this example)

    Extra Connection Properties: Leave at the default value. By default, the zeroDateTimeBehavior parameter is defined and it is usually not necessary to add more parameters.

    images/download/attachments/6033891/image2015-3-2_8_31_15.png

  7. Click on Create New Database Connection at the bottom of the form. Your connection is now created and the Database Connections page is displayed showing the Status of your connection as Valid.

    images/download/attachments/6033891/image2015-3-2_8_31_43.png

  8. To display the details about the status of your database connection, see the Note on the above window and click on the Database Connection Status link. This will display any errors if your status is Faulted, in this example it shows the status as being Valid.

    images/download/attachments/6033891/image2015-3-2_8_32_14.png