开发者

installation error on mongo DB

开发者 https://www.devze.com 2023-03-17 02:21 出处:网络
I installed MongoDB on ubuntu 11.04 followed by this site. I gave this command to run MongoDB sudo /etc/init.d/mongodb start

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
开发者_JAVA技巧

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


You may should try to run:

mongo --nodb

This worked for me.


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
0

精彩评论

暂无评论...
验证码 换一张
取 消