How I can connect to university cluster from shell not from compass?

I have access to
cluster0-shard-00-00-jxeqq.mongodb.net:27017 from compass
But I want to test some queries from video in mongo shell

I try connect:
mongo “mongodb+srv://cluster0-shard-00-00-jxeqq.mongodb.net/movies” --username m001-student --password m001-mongodb-basics
DNSHostNotFound: Failed to look up service “_mongodb._tcp.cluster0-shard-00-00-jxeqq.mongodb.net”: Undefined error: 0
try ‘mongo --help’ for more information

Please try this
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/video?replicaSet=Cluster0-shard-0 --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

2 Likes

Thank you! I have connected! It works