Not able to check/list collections

I am in chapter 2 of M001 course and connecting to the Atlas cluster from Mongo shell.
I am using “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”

Now I am trying to list all collections using “show collections” but it now showing any list. I am attaching a screenshot here.

Correcting my sentence-

Now I am trying to list all collections using “show collections” but it is not*showing any list. I am attaching a screenshot here.

You have to select a database with use DatabaseName.

1 Like

Please check the connection string. I have already mentioned the database name.

Hi @neha_07638,

The test database has no collections in it and that’s why you are seeing no output.

You can see the list of all the databases present in this cluster by using the show dbs command.

Hope it helps!

Thanks,
Shubham Ranjan
Curriculum Services Engineer

1 Like

1 Like