I have a Mac running 10.8.2 and just installed mongodb running the brew install mongodb command. Everything seemed to be installed correctly. However when I run mongo to enter the shell I get the following error:
Alexander-Burgos-Collazos-MacBook:~ Alexander$ mongo
MongoDB shell version: 2.2.3
connecting to: test
Wed Feb 6 19:44:59 Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed
I followed some threads around here but never got a clear and concise answer as to how to fix it. I entered mongod in the command terminal and it returned:
all output going to: /usr/local/var/log/mongodb/mongo.log
From there on everything I input does not return anything. I am confused as to how this really works.
May be mongod not started.
For start manually use command:
But brew has a lanchctl plist. You can run this command and mongodb launch at login:
More about brew version mongodb:
More about mongod you can read in manual.