0

I have a MongoDB replica set cluster with one primary node and two secondary nodes. I created a user inside admin db of my primary node using the below command

db.createUser(
{
user: “myUserAdmin”,
pwd: “abc123”,
roles: [ { role: “readWrite”, db: “admin” } ]
}
)

After this when I try to establish connection to this cluster from vault using the below URI, I am not able to establish connection

mongodb://{{username}}:{{password}}@primary_node:port,secondary_node_1:port,secondary_node_2:port/admin?tls=false&serverSelectionTimeoutMS=2000&replicaSet=rs0

I also gave my admin db user creds which is myUserAdmin, abc123 for verifying the connection. Still not able to connect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.