I’m doing the Mongo M001 Course (Basics) and I use macOS, and I couldn’t download the enterprise server, instead I downloaded the community server. Everything was fine, I installed mongo shell guided by this https://zellwk.com/blog/install-mongodb/ , then I followed every step of the mongo course to connect the compass, I didn’t receive any warning or error, “PRIMARY>” showed as in the tutorial. But when I typed “show collections” didn’t show anything, it was supposed to show “data”. But then I typed “use video” “show collections” it did show the movies collection. I don’t know why it didn’t show the data collection but did for the videos. I don’t know if it is due to the community server, or so. Please help!!!
Hi @Monica_Nava_Palomo and welcome to the community!
It depends how you have connected to the mongodb shell. I assume that you copied the connection string from the class handouts.
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
This will connect to the database “test”, there are no collections. just follow the course video at 1:40 min to 3:40 and you will see that you should need to connect to the 100YWeatherŚmall database, there you will find the “data” collection.
The university discussions are not yet part of this forum, as subscriber of the course you can access the University forum discussions here
Just for completeness, the attached link show you the differences between the enterprise vs. community version
Hope that helps
Hi Michael I have changed the db - to 100YWeatherSmall - while I get the command line prompts working, I can not see the database when I move to the next section
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/100YWeatherSmall?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics
Hi @Sumitra_Sastri a further welcome to the community, happy to see you working on m001.
I assume that you work on lectures in m001, chapter 2.
I am not sure what the problem is, you get the command line working and you can connect to 100YWeathersmall.data? Then you move to the next section and you do not see a db which you expect to see?
When you can tell me exactly which section you are working at, I’ll have a look.
May I just put a kind reminder here? As mentioned in the previous posting the university discussions are not yet part of this forum, as subscriber of the course you can access the University forum discussions here - This is the place I’d suggest to ask future questions.
As of your current questions, just let me know where you are and what you expect to see, but you don’t do – I’ll see what I can do.
Hi Michael, I typed the connection you wrote. And this happened:
Still doesn’t show the data collection, what should I do?
Hi @Monica_Nava_Palomo, I just signed up for the course to see what’s going on and was able to connect to the course servers with the following command:
mongo "mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,clu0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/100YWeatherSmall?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics
From there I typed in
show dbs and got the following results:
MongoDB Enterprise Cluster0-shard-0:PRIMARY> show dbs 100YWeatherSmall 0.128GB admin 0.000GB aggregations 0.067GB citibike 0.367GB city 0.002GB config 0.016GB coursera-agg 0.083GB local 0.940GB mflix 0.449GB results 0.000GB ships 0.001GB video 0.513GB
Here we can see a list of the the databases available to us, with the one in question:
Next you will want to switch into the context of the database
MongoDB Enterprise Cluster0-shard-0:PRIMARY> use 100YWeatherSmall
You should get a confirmation message:
switched to db 100YWeatherSmall
If you use
show collections now, you should see your
MongoDB Enterprise Cluster0-shard-0:PRIMARY> show collections data system.profile
In the screen shot you provided above, you did
use data which means you switched into the context of the
data database which does not exist and that is why
show collections does not return anything.
As @michael_hoeller has mentioned, asking questions on the MongoDB University forums for the M001 course would be the correct place to ask as that’s where the course admins are looking for questions. You might get answers here, but they will most likely be delayed or not as beneficial unless another student taking the course happens to be around.
It worked! thank you! and sorry
Hi @Doug_Duncan thank you, good to be in different timezones - so a quick answer is guaranteed
Thanks for getting back to me Michael. I resolved the challenge as the problem was Apple’s privacy and security settings which by default block all apps unless you override the security settings. I have added Compass now to the list of apps that work on overriding Apple’s default settings.
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.