You can translate the question and the replies:

List multiple servers (of a replication set) in Connection String when creating MongoDB base view

I need to know the connection string to use when connecting to MongoDB which is part of a replication set (the set consists of 3 servers). The Connection String I use when connecting to one MongoDB database is: mongodb://server1:port/dbname?authSource=$external&authMechanism=PLAIN What should be the Connection String when connecting to a replication set (in this case 3 servers): server1, server2, server3
user
08-03-2017 16:33:45 -0500

1 Answer

Hi, I would suggest you to use the following connection URI: mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]] You can also refer the following link for detail description of the connection string format, https://docs.mongodb.com/manual/reference/connection-string/. Hope this helps.
Denodo Team
09-03-2017 07:10:49 -0500
You must sign in to add an answer. If you do not have an account, you can register here