Aggregation connection to course cluster from PyMongo (Python)


Im really looking forward to this course, but I would rather connect via PyMongo, are you able to provide me with the SRV version of the course materials connection string:

mongosh "mongodb://,," --authenticationDatabase admin --tls -u m121 -p aggregations

im also happy to connect via Compass but I get these errors:

Thanks in advance!

All the best, Chris

The correct format for the connection string is


The above should work for both Compass and python. No need for an SRV record.

The above is just a warning that goes away once you add the tls=true to the connection string. Note that all connections to Atlas require tls=true in the connection string. Using an SRV record automatically sets this even if you don’t add it.


Awesome, thanks doug. got it up and running in python :slight_smile:

1 Like

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