Chapter1, 8. Connect to cluster from MongoShell

I am following the instructions to connect to the cluster (I have Windows 10) and I don’t know how to add the PATH. I am using ANACONDA and have it added in my PATH.

Please help!!
I also don’t know how to connect the application as I get the following error, although I do have pymongo installed:

Hi Ines_55979,

It seems like you are in Mongo shell already and for connecting to your atlas cluster from your mongo shell, you need to run below command:

$ mongo "mongodb+srv://m220student:m220password@<YOUR_CLUSTER_URI>"

Please let me know if that does not resolve you issue. We will be able to help better if you can provide the whole screenshot as it is unclear from where you are running the connection command.


What about step 2 of the configuration regarding adding the Mongo shell directory to PATH? I have not done that step nor know how to do it. Also, is that necessary or only connecting to “you application”?

When clicking on “connect” from Atlas there are 3 options, the first 2 are: connect via Mongoshell and connect You Application. Which one to choose?

This is what I see. I am guessing I should substitute <YOUR_CLUSTER_URL> but I don’t know what to put.

HI @Ines_55979,

You are already in a Mongo Shell, to connect to your atlas cluster, please disconnect with your current running Mongo Shell.

 > quit()
 $  mongo "mongodb+srv://m220student:m220password@<YOUR_CLUSTER_URI>"

For M220P, we always recommend to do M001-MongoDB Basics Course. It gives you basic understanding of MongoDB and atlas cluster.