Categories

Versions

Using the MySQL Connector/J (JDBC driver)

Altair AI Studio comes bundled with the MariaDB Connector/J – a driver that allows to connect to both MariaDB and MySQL databases. If you want to connect to MySQL databases using the official driver, you need to manually download and configure the MySQL Connector/J.

This article will walk you through how to:

Download and extract the MySQL JDBC Connector/J

Download the latest Platform Independent release of MySQL Connector/J from the official MySQL website. Both the compressed TAR archive and the ZIP archive will work.
The connector itself is a single file named mysql-connector-java-X.X.XX.jar. Extract this file from the downloaded archive to a location on your hard drive that is accessible from Altair AI Studio.

Create a new JDBC Connection

  1. In Altair AI Studio, right-click on the repository you want to store your Database Connection in and choose New Connection Icon Create Connection.

    ../img/create_new_connection.png

    You can also click on Connections > Create Connection New Connection Icon and select the repository from the dropdown of the following dialog.

  2. Give a name to the new Connection, and set Connection Type to Database Connection Icon Database:

    ../img/create_jdbc_connection.png

  3. Choose MySQL as the database system.

    ../img/edit_jdbc_connection_system.png

    Fill out or adapt other necessary fields like User, Password, and Host.

  4. Go to the Driver tab and remove the existing JAR file from the list. Then select the previous downloaded mysql-connector-java-X.X.XX.jar as the JDBC driver Jar file. Note that the JAR file will be bundled inside the connection itself, so you can move or delete the downloaded file.

    ../img/edit_jdbc_connection_driver.png

  5. Use Test Connection IconTest connection to check your settings by connecting to the database. After a successful test, you can close the dialog by clicking on Save Icon Save.

Use the JDBC connection

Use the newly created JDBC Connection with the Read Database, Write Database or Update Database operator.

In the following example the first Read Database operator uses the repository setting of define connection to select the connection entry by its path. While the second Read Database operator is directly connected to the connection with its connection input port.

../img/read_database.png