Connecting to Comapss using connection string

I’m unable to connect to host. The GUI is asking for a connection string (SRV OR STANDARD). Please provide the connection string.

1 Like

Hi @Deepika_15237,

Please paste this connection string in the SRV OR Standard text field for connecting to the class atlas cluster.

mongodb://m001-student:m001-mongodb-basics@cluster0-shard-00-00-jxeqq.mongodb.net:27017/?authSource=admin&replicaSet=Cluster0-shard-0&readPreference=primaryPreferred&appname=MongoDB%20Compass&ssl=true

Alternatively you can also fill in the individual fields. Please click on Fill in connection fields individually and follow the instructions mentioned in the Lecture : Connecting to MongoDB Using Compass.

Hope it helps!

If you have any other query then please feel free to get back to us.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hello,
I am trying to connect to compass using the values described in the course ware and I am getting this error

connect ECONNREFUSED 52.4.238.74:27017

I have uploaded the screenshot of the screen. Pls advise

Thanks
Swatee


It looks like you might be behind a corporate firewall or VPN that prevents outbound connection.

Check with you system admin.

Hi @Swatee_Jain,

In addition to @steevej-1495,

Did you try to use connection string as well ? it’s better and efficient.

mongodb+srv://m001-student:m001-mongodb-basics@cluster0-jxeqq.mongodb.net/test

~ Shubham

Thank you for your suggestions. As suggested it is due to corporate firewall. I also tried connection string with same error. I was able to connect on my home laptop.

Thanks
Swatee