NewUser
NewUser

Reputation: 13333

installation error on mongo DB

I installed MongoDB on ubuntu 11.04 followed by this site. I gave this command to run MongoDB

sudo /etc/init.d/mongodb start

It showed some error like this

sudo: /etc/init.d/mongodb: command not found

I checked the file.But it was okay.Can any one tell me how to solve this.

Please help me .I am newbie to mongoDB. [edited] When I am connecting to mongo it is showing error like

connecting to: test
Sun Jul  3 09:57:29 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79

Upvotes: 3

Views: 1712

Answers (2)

ssoler
ssoler

Reputation: 5274

Regarding to the connection error, you can try:

sudo -u mongodb mongod -f /etc/mongodb.conf --repair

This starts the daemon using the config file /etc/mongodb.conf and repair the database.

Then start the database:

sudo -u mongodb mongod -f /etc/mongodb.conf

Upvotes: 0

Akendo
Akendo

Reputation: 2289

You may should try to run:

mongo --nodb

This worked for me.

Upvotes: 5

Related Questions