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 trialJonathan Grieve
Treehouse Moderator 91,253 PointsUnable to Setup Mongo
It's a shame but I'm unable to set up Mongo on my Windows machine.
I'm following the instructions on the Teachers notes. I use Windows 7 so it downloads Mongo to my program files directory. Windows command prompt won't add \fata\db to the directory. And I can't use homebrew as it's a Mac application.
Now I like to think of my self as reasonably confident on the command line. I can get by. But when I try to open mongod.exe inside the bin folder I get a response but it's not the same as in the video.
That could be because it's a slightly different version but I suspect not. I get the "waiting for connections on port 27017, as the final line in the command prompt but what comes before it is different.
It looks like I'm not connecting to Mongo because "the target computer is actively refusing" connections.
What's the Mongo Shell? How do I get to it?
Basically I don't have a clue what I'm doing.... help!! :o
4 Answers
jason chan
31,009 Pointshttps://youtu.be/1uFY60CESlM?list=PL6gx4Cwl9DGDQ5DrbIl20Zu9hx1IjeVhO
If your on windows.
Make sure to have mongod on terminal
mongo the other terminal
tobiaskrause
9,160 PointsA lot of Win7 seem to have problems... Maybe try some tips from http://stackoverflow.com/questions/23726684/mongodb-on-a-windows-7-machine-no-connection-could-be-made
Jonathan Grieve
Treehouse Moderator 91,253 Pointsnothing seems to be work.
I should be able to access Mongo by using Windows Command Prompt right? by typing CMD into start menu.
if I try to use the mongo command first it isn't picked up even though I know the files for mongo are installed.
jason chan
31,009 PointsHave you checked the ports? Something might be blocking mongod port? Maybe your antivirus that was me before.
you try following a long on c9.
https://docs.c9.io/docs/setting-up-mongodb
My tutorial on how to setup mongodb on cloud9
Jonathan Grieve
Treehouse Moderator 91,253 PointsI'm not an expert but I think I'm good to go now?
I opened mongo first and then mongod and it says one connecton opened but I'm not sure what it says about Hotfix KB2731284
jason chan
31,009 Pointsthat means your good man.
try the following commands:
show dbs
use db
show collections
db.collectionname.find().limit(1)
That's about it.
Jonathan Grieve
Treehouse Moderator 91,253 PointsExcellent, seem to be sorted from here thanks for your help :)
Jonathan Grieve
Treehouse Moderator 91,253 PointsJonathan Grieve
Treehouse Moderator 91,253 PointsHi Jason, that's a great link thanks for providing it. I've picked up some very useful tips from it. I forgot how good Bucky's tutorials are. I found Treehouse through ads on his videos and I abandon him for Treehouse. :D
Anyway I digress.
I think what's happening is I'm missing a file or 2 that's stopping me from connecting to Mongo.
What could have I have missed?
William Curry
4,107 PointsWilliam Curry
4,107 PointsExcellent link. Extremely grateful for not only the solution, but another edu source aimed at Windows users.