connect failed mongo db on mac osx
macos, mongodb
Solution
you should read the documentation here: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ And follow the instructions.
In this case the [bunch of numbers] are the hostname/ip and port number that the binary `mongo` has tried to connect to. What it's telling you is that there is no `mongod` binary listening on the hostname and port that `mongo` is trying to connect to.
You will need to start `mongod` before you are able to connect to it with a `mongo` shell. The documentation above outlines this further.
If you use homebrew the mongodb binaries will automatically be put on your path which means you won't need to cd into another directory like mongo/bin.
Good luck.
Problem
i'm trying to learn mongo db on my mac. I installed mondgo db using homebrew and it appeard successful. I created the dir `/data/db`. when I type `mongo` into the terminal I get: ``` Error: couldn't connect to server [a bunch of numbers] at src/mongo/shell/mongo.js:145 exception:connect failed ``` I looked at the following answer on SO: Installing and Running MongoDB on OSX in the check answer it says: 1) Start a terminal for your mongo server 2)Go to mongo/bin directory What does it mean to start a terminal for your server? does that mean just open up a new terminal window? Where can I find the mongo/bin directory? Any other suggestions on getting mondoDB up and running would be appreciated.