Error connecting to MongoDB: unexpected token string literal

Hello i have some questioning about mongodb shell connect

When I was an opened shell and I was connected to
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

this above run command and still getting an error please say me solution

Hello @Raj_Parmar,

You are already in mongo shell environment (you have used the mongo --nodb command). To connect to a MongoDB instance follow the instructions from Opening New Connections from within the shell you are in.

1 Like