Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mongoDB test error

I came to know about mongoDB and looked for test.So I made it install and then for test when I used command mongo on terminal it showed an error like this

MongoDB shell version: 1.8.2
connecting to: test
Sun Jul 31 01:06:07 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
exception: connect failed

So can someone tell me what is the problem.I am using ubuntu 11.04.For installation instruction I had used this site.I am newbie to this mongoDB so please helpe me.Any help will be highly appreciable.

like image 488
NewUser Avatar asked Jul 30 '11 19:07

NewUser


2 Answers

All you need to do is open 2 terminal tabs. In one, run

mongod

which starts the MongoDB server.

In the other, run

mongo

which is the shell that connects to your MongoDB server.

like image 164
Kevin Suttle Avatar answered Nov 18 '22 07:11

Kevin Suttle


It looks like MongoDB isn't running. Can you connect to the web interface in your browser?

http://localhost:28017

Also, do you see the process running on your machine? You should see an entry for mongod when running ...

$ top

or

$ ps aux
like image 5
Justin Jenkins Avatar answered Nov 18 '22 08:11

Justin Jenkins