Reputation: 31
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
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.
Upvotes: 4