SyntaxError in MongoDB Shell

MongoDB Enterprise > 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/aggregations?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl -u m121 -p aggregations --norc
uncaught exception: SyntaxError: unexpected token: string literal :
@(shell):1:6

Hi @Muthukumaran_S,

You are already connected to the mongo shell as your prompt shows:
MongoDB Enterprise>

The reason for this error is that you are trying to connect to the mongo shell from within the shell itself.

You can just try to run the following commands and proceed further in the course:

  • To view the databases:

show dbs

  • To check the database that you are connected to:

db

  • To switch to the aggregations database:

use aggregations

  • To view collections in the current database:

show collections

Please feel free to reach out if you have any additional questions.

Kind Regards,
Sonali

Thanks Sonali