Connecting to Our Class Atlas Cluster from the mongo Shell (Windows 10)

I can’t connect to Atlas Cluster from the mongo Shell (Windows 10).

I’m using the same command that the instructor gave to us, "mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics"

All I can get is this message: "2019-02-10T13:49:34.482-0200 E QUERY [thread1] SyntaxError: missing ; before statement @(shell):1:6

I tried to use the previous version, but I can’t download it anymore.

Does somebody know about this message?

Thanks!

1 Like

Use. The. Search.

You will find umpteen threads with the same question and answer :slight_smile:

Including this one…

All new users, please read: these are NOT blocking errors!

Hi Felipe_02621,

You need to exit the mongo shell and run the mongo command then.

You don’t need to type mongo --nodb. Open a new tab and then type:

 $ mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

Kanika

1 Like

Hi Kanika,

As the instructor showing the url to connect mongo shell with the Atlas Sandbox cluster. That url is not availabe on the pop up appears after clicking on the connect button.

Url%20to%20connect%20with%20mongo%20shell

Your screenshot shows the wrong part :smiley:

You’re in step 1, downloading client software. You’re actually looking for step 2, connecting to Atlas. Step 2, just below 1, will contain the URL you’re looking for.

Hi Jitendra_06416,

You need to download Mongo Shell environment from mongodb.com/download-center/enterprise

Then, you need to click on 2nd step based on the version you are using. I recommend downloading the latest version 4.0.6.

Kanika