M103 Lab -Change the default db path, Config file missing

I couldn’t see the config file under browse file to edit changes. I have created a directory mkdir -p /var/mongodb/db , i am stuck to go further . I know how to modify the config file. But where can I do that .Do I need to create a new config file?

Does the lab ask you to create a new config file or modify existing one?
Since it is to modify the dbpath you may need to edit a file from previous lab or create a new one by copying contents of old file and modify just the parameter they asked

I am using the lab environment and I change the mongod.conf file shown with the correct dbPath: /var/mongodb/db. However starting mongo does not pickup this file. Do i need to create different mongod.conf file somewhere else ? if i start it with mongod --dbpath /var/mongodb/db it works but the Run Tests fails. Is there something else that needs to be created ?

Post a screenshot of the whole IDE so that we see exactly how you start mongod.

I found my error . I must start mongod with mongod -f mongod.conf … then it picks up the config.

1 Like

sorry i don’t understand what you mentioned. My issue is with [Lab: Change the Default DB Path] , I came to this lab after completing the previous lab of Lab: Configuration File which is to modify the yaml of mongod.conf. In my current lab i can not see any config files to edit. I hereby attach the screen shot. I am using IDE . As you said, do I need to copy config file ?. Because in the steps nothing provided other than Edit your config file to use this new directory as the dbpath.

Finally My issue is resolved ,after so many refresh I finally found the mongod.conf file .I don’t know why it was showing before. I tried so many refresh before too,


Hi @Lifas_Kassim and @Marcus_Blackhall

I’m happy that you both were able to find out the solution.
If you still have any questions feel free to mention them down here. We are here to make your learning experience more interesting.


1 Like