Unable to connect tp Mongo DB Atlas Shell

Hi Team!

am getting the following error and could find any help how to resolve it - apart from the course saying to hit quit ()

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
2019-10-05T22:03:02.030-0400 E QUERY [js] uncaught exception: SyntaxError: unexpected token: string literal :
@(shell):1:6

Any help is welcome, as am not able to move ahead with the course

Thanks

Copy and try this:
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

thank you - i get the same error - just tried

I think you’re trying to run it in the Mongo shell. You need to run it outside the shell. Hit Ctrl+C to come out of the shell and try it there.

Maybe you’re already connected and you don’t need to run it again.

gosh that was dumb of me!! you are right!!! thanks a million for this one…i am able to connect now.

Don’t worry. It’s a bit confusing sometimes. :slight_smile:

Hi @Anindita_13687,

I’m glad your issue got resolved. If you have any other query please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Rajan
Curriculum Support Engineer

I tried doing in both… Please advice!!!
From mongo shell

From command prompt

@vaishnavimecit same thing above.

Run it from the C:\Users\vaish> prompt, not the > prompt. The latter is mongo shell connected to your localhost.

Thank you so much… Got it now!!!

Very good! :v::slightly_smiling_face:

Hi @vaishnavimecit,

I’m glad your issue got resolved. If you have any other query please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer