CLUSTER connect

how to connect to cluster . Can u specify to me in deatil

Which cluster you want to connect?
Class cluster or your own cluster?
from mongo shell or compass?
Please check our forums.There are many threads on it
for class cluster you can use below to connect using compass

Hostname: cluster0-shard-00-00-jxeqq.mongodb.net
Username: m001-student
Password: m001-mongodb-basics
Replica Set Name: Cluster0-shard-0
Read Preference: Primary Prefered

To connect from mongo shell use below
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” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

1 Like