Docs Menu
Docs Home
/
Relational Migrator
/

Connect to PostgreSQL

On this page

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

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

Important

If PostgreSQL is configured as a cluster, Relational Migrator must connect to the master server.

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

  • Identify your database connection string or database information.

  • Connect to PostgreSQL.

Important

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

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

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

The PostgreSQL connection string looks like:

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

For example, the pg-demo PostgreSQL database running on localhost at port 5432 uses the following connection string:

jdbc:postgresql://localhost:5432/pg-demo

Note

To learn more about PostgreSQL connection strings, see:

  • PostgreSQL Connection Configuration Properties

1

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

2

In the Database type drop-down, select PostgreSQL.

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 connect to the default database.

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:

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

  • Require: Require an encrypted connection.

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

  • Verify full: 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 PostgreSQL.

Back

Configure Oracle