Connect to PostgreSQL
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.
About this Task
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.
Steps
Database Connection String
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:
Connect to PostgreSQL
To create a connection string, enter the following:
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 |
SSL: Use SSL | Enable or disable SSL. |
SSL: SSL mode | With SSL enabled, choose from:
|
Learn More
Relational Migrator relies on the open-source Debezium connector to capture row-level changes. For more details, see Debezium PostgreSQL.
For information about supported databases and versions, see Source Databases and Versions.
For information on managing saved connections, see Manage Database Connections.
For information on Relational Migrator projects, see Create and Manage Projects.