Unable to connect to Mongo Atlas using mongo shell

I tried running below command from mongo shell. but i’m getting error as “2020-04-02T21:46:25.488+0530 E QUERY [js] uncaught exception: SyntaxError: unexpected token: string literal :”
mongo “mongodb+srv://cluster0-jxeqq.mongodb.net/test” --username m001-student -password m001-mongodb-basics

The string is fine.I can connect

By any chance are you at mongo prompt?
Please exit and run the command again from your os prompt

Hi @ramya29p,

As @Ramachandra_37567 mentioned, most likely you are already inside the mongo shell. Please use the exit command to exit out of the mongo shell.

Hope it helps!

Please feel free to get back to us if you have any other query.

~ Shubham

Thank you. It worked.