Using the MySQL Connector/J (JDBC driver)

This guide targets the new Connection Management introduced with RapidMiner Studio 9.3.

For the old Legacy JDBC Connections see the9.2 documentation

RapidMiner Studio comes bundled with the米ariaDB 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米ySQL 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米ySQL website. Both the compressed TAR archive and the ZIP archive will work.
The connector itself is a single file namedmysql-connector-java-X.X.XX.jar. Extract this file from the downloaded archive to a location on your hard drive that is accessible from RapidMiner Studio.

Create a new JDBC Connection

  1. In RapidMiner Studio, right-click on the repository you want to store your Database Connection in and chooseNew Connection IconCreate Connection.

    You can also click onConnections > Create ConnectionNew Connection Iconand select therepositoryfrom the dropdown of the following dialog.

  2. Give a name to the new Connection, and setConnection TypetoDatabase Connection IconDatabase:

  3. Select the Database system from the list of predefined DBs, or choose a custom system.

    Fill out or adapt other necessary fields likeUser,Password, andHost.

  4. (This step is only necessary if you have selected aCustomDatabase system). Go to the Driver tab and select the previous downloadedmysql-connector-java-X.X.XX.jaras theJDBC driver Jar file. Note that the JAR file will be bundled inside the connection itself, so you can move or delete the downloaded file.

  5. UseTest Connection IconTest connectionto check your settings by connecting to the database. After a successful test, you can close the dialog by clicking onSave IconSave.

Use the JDBC connection

Use the newly created JDBC Connection with theRead Database,Write DatabaseorUpdate Databaseoperator.

In the following example the firstRead Databaseoperator uses the repository setting ofdefine connectionto select theconnection entryby its path. While the secondRead Databaseoperator is directly connected to the connection with its connection input port.