Connection string for training database

what is the connection string for the shell of the training database from the first part of the training ?

Hey @Maarten_61328

Maybe these docs & docs could help; and see video titled Connecting to Our Class Atlas Cluster from the mongo Shell. In the lecture notes ( I have added in the read preference )

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&readPreference=primaryPreferred" --authenticationDatabase admin -u m001-student -p m001-mongodb-basics --ssl 

Best of luck in the rest of the course

1 Like

thx @natac13 we found out it works with this:

mongo "mongodb+srv://cluster0-jxeqq.mongodb.net/" --username m001-student --password m001-mongodb-basics

1 Like

Thx @Maarten_61328 this is is gold! I have been searching for a post like this. Here is something you can try out. You can paste the following connection string into the VS Code Plugin “Azure Cosmos DB”. This gives you nice autocomplete features for your queries:

mongodb+srv://m001-student:m001-mongodb-basics@cluster0-jxeqq.mongodb.net/