M001:Chapter2: DnsProtocol error

Hi,

I am in M001-Chapter2. I get below error for the command.
Command:
mongo “mongodb+srv://m001-student:m001-mongodb-basics@sandbox.xxxxx.mongodb.net/admin”

Error:
“DNSProtocol error: no srv records for mongodb._tcp.sandbox.xxxxx.mongodb.net”

Help please…

Regards,
Sushma

Have you whitelisted your IP?
May be your network not supporting SRV type connect string

Use straight double quotes in the connect string

mongodb+srv://m001-student:m001-mongodb-basics@sandbox.xxxxx.mongodb.net/admin

is certainly not your cluster URI. This is an example of how a URI looks like.

Thanks for your response.

I am able to connect with the connect string copied from Atlas.

Regards,
Sushma

Hi,

Thanks for your response.

I tried below and it worked.

mongo “mongodb+srv://sandbox.xxxxx.mongodb.net/test” --username m001-student

Regards,
Sushma