Skip to content

Connecting to the MongoDB server

Kartikk R Pandian edited this page Nov 9, 2017 · 4 revisions

Connecting to the MongoDB server

To connect to the MongoDB server, you can use the below URI:

mongodb://<USERNAME>:<PASSWORD>@cluster0-shard-00-00-snmsy.mongodb.net:27017,cluster0-shard-00-01-snmsy.mongodb.net:27017,cluster0-shard-00-02-snmsy.mongodb.net:27017/test?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin

Note: replace the username and password field.

Connecting with Node.Js

This link contains an example on how to connect to the db using Node.Js

Configuring the parameters

A detailed list of all configurable connection parameters are available here

Using the MongoDB Compass GUI client

For viewing/editing the database the MongoDB Compass GUI client can be used. The client can be downloaded from here

Configuring the Compass client

To configure compass, you can refer this link

Note: Only the host-name, user-name & password are mandatory

Clone this wiki locally