shagun saxena
shagun saxena

Reputation: 31

error in connection mongodb atlas to shell

mongo "mongodb+srv://sandbox-hoj54.mongodb.net/test" --authenticationDatabase admin --username m001-student --password m001-mongodb-basics 2020-06-19T14:18:02.553+0530 E QUERY [js] uncaught exception: SyntaxError: unexpected token: string literal : @(shell):1:6

Upvotes: 3

Views: 2491

Answers (1)

Idhanosi Yerimah
Idhanosi Yerimah

Reputation: 121

I think the problem is that you are running this command: mongo "mongodb+srv://cluster0-jxrfu.mongodb.net/<dbname>" --username <password> on the MongoDB shell you downloaded in your <your mongo shell's download directory>/bin directory. Instead, Open up a new command line and run the command. It worked for me. mongodb connection via terminal

Upvotes: 4

Related Questions