MongoVUE connection manager makes it easy to create and store connections to your MongoDB servers. Establishing a new connection is simple – click on the add icon, you’ll get a blank screen as shown below:
Step 1
![]()
Step 2:
Now simply add in the values as indicated below
Name – a name you want to give to this connection for easy mental recall
Server – IP address of your server or DNS name
Port – the port on which MongoDB server is listening
Username (optional) – username if you are using authentication
Password (optional) – password
Database (optional) – comma separated list of databases, if you want to connect to specific dbs. if you leave this empty then all databases will be available under “Database Explorer”
![]()
![]()
That’s it, hit the “Save”, and double click on your connection name to open it.
Step 2(b)
Lets us now explore how to connect to replica sets. Let us assume that we have 4 servers in our set:
Server 1: a.replica-set.com Port: 28001
Server 2: b.replica-set.com Port: 28002
Server 3: c.replica-set.com Port: 28003
Server 4: d.replica-set.com Port: 28004
There is no place in the connection window to enter information on these 4 servers. Some replica sets may have more servers also. So, the trick is to enter the information on all these server on in the “Server:” text box. See image below:
![]()
The syntax to enter these servers is a comma separated list of server and its port configuration:
a.replica-set.com:28001, b.replica-set.com:28002, c.replica-set.com:28003, d.replica-set.com:28004
Please note that the syntax above, port number is optional. So if you are using default ports then you may simply skip port info:
a.replica-set.com, b.replica-set.com, c.replica-set.com, d.replica-set.com
You must have noticed in the screenshot above that the “Port:” textbox is replaced by a “ConnectTo:” dropdown. When you connect to a replica set, you can provide additional information on which specific server(s) you want to connect to. The options in this dropdown are:
All – Wait for all members of the replica set to be connected.
Primary – Wait for the primary member of the replica set to be connected.
AnySlaveOk – Wait for any slaveOk member of the replica set to be connected (includes primary, secondaries and passives).
You can read more about these options at this url.
That’s it, hit the “Save”, and double click on your connection name to open it.