Could not connect to atlas from shell

mongo “mongodb+srv://” --username m001-student -password m001-mongodb-basics

DNSHostNotFound: Failed to look up service “”: Undefined error: 0

some one please help…

Please try this connect string

mongo “mongodb://,,

1] 736
[2] 737
[3] 738
[2]- Done replicaSet=Cluster0-shard-0
[3]+ Done ssl=true
MongoDB shell version v4.0.17
exception: No digits

I used and I get something like this

Please try again.I can connect
It could be quotes or some space/invalid character issues in the string

Quotes fixed:

mongo "mongodb://,,"

If it doesn’t work, share a screenshot.

thank you so much this worked …

sorry, just curious to know why did the connection string given in the course did not work?

Hi @PoornimaChinnaraj0909,

Not all DNS providers or routing systems support the SRV protocol and hence they fail to resolve the SRV record.

We have updated the lecture notes to add the Standard connection string in the lecture notes as well.

Shubham Ranjan
Curriculum Services Engineer