How to resolve error :dbpath (/data/db/) does not exist permanently in MongoDB

Assuming you have followed the instructions to install a packaged version of MongoDB, you should be starting and stopping mongod using service.

To start mongod:

 sudo service mongodb start

To stop mongod:

 sudo service mongodb stop

If you use the service command to start and stop, it should be using the configuration file: /etc/mongodb.conf.

Starting mongod from the command line

If you run mongod directly instead of using the service definition, you will also have to specify a configuration file as a command line parameter if you want one to be used:

mongod --config /etc/mongodb.conf

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)