I have changed the dbpath of mongodb.conf. And after that trying to start mongodb service,when I run
sudo service mongodb start
I get back
mongodb start/running, process 7320
After that I run:
sudo service mongodb status
And getting back
mongodb stop/waiting
When I want to access mongo shell by :
mongo
MongoDB shell version: 2.0.4
connecting to: test
Sun Oct 28 13:01:36 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:84
exception: connect failed
But when I start mongod as manually by mongod --dbpath=/mnt/data/db
it runs fine.
And I can access the mongo shell by mongo
command.
I have correct permission for my data directory.
Any clue where I am doing wrong?