Chnage the Deafult DB Path

I am unable to configure the mongod. Need help :frowning:

The lab asks for /var/mongodb/db but your configuration file specifies /data/db and it looks like you are trying without the configuration file to use the non existant /var/mongdb/db.

They are all different and only /var/mongodb/db is correct and must be in the configuration file and you should use the configuration file to start mongod.

I used the --dbpath and mentioned that path. Is that wrong?

Yes it is. Because you have to follow the lab instructions. At step 2, you will read:

Edit your config file to use this new directory as the dbpath.

So you have to edit the configuration. And you must start mongod with the modified configuration file. If you are unsure on how to use the configuration file go back to previous lab/lesson where it is explained.

The path you mentioned is wrong. As I wrong /var/mongdb/db is not the same as /var/mongodb/db