Docs Menu
Docs Home
/
Relational Migrator
/ /

Create a Relational Migrator User in MongoDB

On this page

  • Steps

To run a data migration job, Relational Migrator requires MongoDB account credentials with the readWrite role on the target database. This page describes the procedure to make a user in your MongoDB database.

Relational Migrator can connect to an Atlas cluster or an on-premises deployment. Select the tab corresponding to your deployment type.

1

Log in to the Atlas GUI.

2
3
4
5
6
7
8
9

Use mongosh to provision a user account that has readWrite access to your data migration target database.

The example commands assume your deployment is running on localhost on the default port of 27017, and that you're creating a user to access the MongoEnterprises database.

For more information on connecting to MongoDB using mongosh, see Connecting to your MongoDB Deployment.

1

You must use an account that can run createUser on the admin and MongoEnterprises databases.

mongosh "mongodb://myadminuser:myadminpassword@localhost:27017/admin"
2

Run the following command to create a migrator-service user with a password of your choice and readWrite access to the MongoEnterprises database:

use admin
db.createUser(
{ user: "migrator-service",
pwd: "password",
roles:[{role: "readWrite" , db:"MongoEnterprises"}]
}
)
3
use MongoEnterprises
db.createUser(
{ user: "migrator-service",
pwd: "password",
roles:[{role: "readWrite" , db:"MongoEnterprises"}]
}
)

Back

Configure Prerequisites

On this page