Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases Mongo Basics Getting Started With MongoDB Setting Up MongoDB

Pierre Smith
Pierre Smith
11,842 Points

not matching the teachers results w/ mongo's show dbs and show collections commands

When I type show dbs I get:

local        0.000GB
mongobasics  0.000GB

and when I type show collections I get:

post

It doesn't show the system.indexes nor does it show anything storage being used...

Can someone tell me why this is happening.

Regarding your last question, Pierre, Homebrew is a package manager for OS. You can read more about its uses here: http://brew.sh

Pierre Smith
Pierre Smith
11,842 Points

Sorry I asked the wrong question I would like to know why my mongo db isn't matching his

andi mitre
andi mitre
Treehouse Guest Teacher

Hey Pierre, did you download through homebrew? also in your mongobasics db can you run this code? db.post.getIndexes()

David Hughes
David Hughes
5,063 Points

I'm getting this same problem. I also installed with Homebrew.

2 Answers

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

Pierre Smith,

From the MongoDB website: "MongoDB 3.0 deprecates direct access to the system.indexes collection." Newer versions o Mongo do not allow access to that collection -- which is a GOOD thing, because it's used by Mongo internally. If you access and change that collection you could break Mongo on your system

If you want text instructions for installing Mongo, you can also follow along with our

jason chan
jason chan
31,009 Points

I would highly recommend following the directions on the documentation

https://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/