Unable to connect

I got the following error code when trying to connect. What am I doing wrong?

MongoDB shell version v4.4.2
connecting to: mongodb://
Implicit session: session { “id” : UUID(“2e8594c8-8b93-49af-adb3-0e1d10f57e64”) }
MongoDB server version: 4.4.2

The server generated these startup warnings when booting:
2020-12-11T14:48:25.912+01:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted

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 :

The command mongo is a terminal command. It is not a mongo shell command. It has to be run outside the mongo shell. You have to exit the current mongo shell and run the command in your terminal.

1 Like

Then I get this error message. I managed to connect using Compass but then I’m not able to load the js-file…

C:>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 ‘mongo’ is not recognized as an internal or external command, operable program or batch file.

You need to set your %PATH%.

I am curious on how you ended up in the mongo shell the first? With the prompt

it means you were already able to issue the mongo command.

I got it now, thank you for your support! I can’t relly answer how I ended up in the mongo shell at the beginning, just happened…