'Error while connecting MongoDB ATLAS TO MONGO DB COMPASS

I am a beginer in mongoDB and learning Mongodb atlas.

  • In MongoDB Atlas, Under database access created username and password ( password is system generated and has no special character)

  • Under Network access added a public ip address (allow access from anywhere)

  • Under database deployment loaded sample database.

  • Now I wanted to see my cluster data, so wanted to connect it to vs code or MongoDB Compass. I clicked connect, selected connect using mongo db compass, copied the string.

  • now i opened Mongodb compass, and under New connection i.e connect to a MongoDB deployment, i entered my URL

    mongodb+srv://gourav_singh:[email protected]/test

  • clicked Connect But i got error as : Unable to connect: connect ECONNREFUSED 3.6.85.199:27017

How I can fix it, Looking for kind help. Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source