Error connecting to course database with MongoDB Compass application

I’ve downloaded the application MongoDB Compass.

The course M121 provides a connection string for use with Mongo shell:

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

from this I copied the URI path and entered it into Compass with the following error result:

Screen Shot 2022-04-16 at 2.49.52 PM

Another post suggests a much smaller and unfamiliar URI, but even after adding mongodb:// (mongodb://cluster0-shard-00-01-jxeqq.mongodb.net) the result is the same:

Screen Shot 2022-04-16 at 2.54.29 PM

Another post a few months newer has a link, but ‘Opps! That page is private’.

Finally, the documentation for using the Aggregation Pipeline Builder is not helpful on this subject.

What’s the secret?

1 Like

The connect string for shell and Compass are different

Try this for Compass

mongodb://m121:aggregations@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?authSource=admin&replicaSet=Cluster0-shard-0&readPreference=primary&appname=MongoDB%20Compass&ssl=true

1 Like

OOh. That is different…

m121:aggregations@cluster0...
authSource=admin
&replicaSet=Cluster0-shard-0
&readPreference=primary
&appname=MongoDB%20Compass&ssl=true

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.