MongoDB Database Connection Strings
Note
URIs in Relational Migrator are optional. You can use the connection string forms to enter your connection details instead of manually providing URIs.
This page describes the Uniform Resource Identifier (URI) formats for defining connections to your MongoDB database.
Relational Migrator supports all connection string options except
appName
. It overrides appName
when connecting to your MongoDB
deployment. For details on MongoDB connection string options, see
Connection Strings.
MongoDB User
For both Atlas and on-premises deployments, create a separate
MongoDB user for Relational Migrator with
readWrite
access to your MongoDB database.
Atlas Connection URI
mongodb+srv://username:password@clusterurl.mongodb.net/database
For example, to use an account named migrator-service
to connect to the
MongoEnterprises
database:
mongodb+srv://migrator-service:password@sandbox.xxxxx.mongodb.net/MongoEnterprises
On-Premises Connection URI
mongodb://username:password@host:port/database
For example, to use an account named migrator-service
to connect to the
MongoEnterprises
database:
mongodb://migrator-service:password@localhost:27017/MongoEnterprises