Docs Menu
Docs Home
/
Relational Migrator
/

Connect to MySQL

On this page

  • About this Task
  • Steps
  • Database Connection String
  • Connect to MySQL
  • Learn More

This page shows how to save a new MySQL connection from the Connections page. You can use a saved connection for any Relational Migrator task that requires connecting to a database.

To save a new MySQL connection in Relational Migrator, you must:

  • Identify your database connection string or database information.

  • Connect to MySQL.

Important

To plan your migration and map your MySQL schema to a MongoDB schema, you must connect using an account with the correct read permissions.

To migrate data, you must connect to your MySQL database using a service account with the required permissions.

For information on database configuration and required permissions, see Configure MySQL.

Relational Migrator requires a connection string to connect to your MySQL instance.

The MySQL connection string looks like:

jdbc:mysql://<host:port>/<database>?<properties>

For example, the test MySQL database running on host1 at port 3306 uses the following connection string:

jdbc:mysql://host1:3306/test

Alternatively, Relational Migrator can create the appropriate connection string based on user-provided database information.

To save a new connection from the Connections page, perform the following actions:

1

In the list of Relational connections, click + Add connection.

2

In the Database type drop-down, select MySQL.

3
  1. Above JDBC URI, enable the Enter URI manually toggle.

  2. Paste your connection string into the JDBC URI.

4
Field
Value

Host

The host IP or DNS name.

Port

The port number.

Database

The database name. Leave blank to load all databases.

Username and Password

The credentials to use for authentication.

Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection.

General / SSL toggle

View SSL settings for the connection.

To use SSL, you must first uncomment and update the server.ssl configuration properties in your user.properties file.

SSL: Use SSL

Enable or disable SSL.

SSL: SSL mode

With SSL enabled, choose from:

  • Preferred (default): Make an encrypted connection if possible, otherwise fall back to an unencrypted connection.

  • Required: Require an encrypted connection.

  • Verify CA: Verify the server certificate against a trusted Certificate Authority.

  • Verify identity: Verify the database connection information against the certificate contents.

5

Enter a Connection name and optional Environment tag.

Environment tags color code and organize connections for convenience. Leaving the drop-down empty is the same as selecting the "None" tag.

6

Relational Migrator attempts to authenticate and connect to the database.

7

The saved connection is available for use in all jobs and projects.

  • Relational Migrator relies on the open-source Debezium connector to capture row-level changes. For more details, see Debezium MySQL.

Back

Connect to Databases