Keep error in change the default DB path. I don't know why

It keep saying that reading config file: No such file or directory

please help me

below is my ide screenshot. please help me figure out

Hello @111645 welcome to the community :wave:

are you sure that your mongo.conf is stored in /var/mongodb/db?
You should run mongod --config mongo.conf out of the same directory where your mongo.conf is saved or you need to provide a path to your mongo.conf.
Regards,
Michael

1 Like

As I’m beginner I’m not sure that I stored mongo.conf in var/mongodb/db.

Is there any way to check it was stored?
or how can I provide path to mongo.conf

Hi
ls /var/mongodb/db will show you what is stored in /var/mongodb/db

It seem like there is nothing.

Then how could I store mongo.conf in there?

In last lecture as I put config info in code editor and run mongod --config mongo.conf. It seemed like it works.

What should I have to do in this lesson? Are there any specific code to provide a path or store in mongo.conf?

Your mongod.conf should be in /root/workspace

user@M103# pwd
/root/workspace
user@M103# ls
mongod.conf        <<<<<<<  mind the "d"
user@M103# 

Hope that helps, otherwise pls add you question, we’ll get you out of it :slight_smile:
Michael

The same problem as in your other post: You made a typo: “mongo.conf” (you typed) vs. “mongod.conf” (actual name of the file).
You basically trying to start mongod daemon specifying path to non-existent configuration file.

1 Like

@111645
I have marked the name of the config file. You can verify the filenames as shown above, just do a ls as shown.
Than use the correct names and you are done.
Best of luck
Michael

How to move .conf file from /root/workspace to /var/mongod/db

You do not need to move it and you should not since it is not part of the requested steps from the lab.

Please follow the lab instructions. It is very hard to give support if you move things around.