Lab - Change the Default DB Path

hello,
I might have missed something, but can someone help me to spot where the error comes from ? thanks!
config file:
config file

validation error:
validation error

You specified dbPath as var/mongodb/db.

The error message indicates that you have to specify dbPath as /var/mongodb/db.

Just to be clear you are missing the leading slash.

1 Like

Hi @ChangChien.Chang,

I hope you found @steevej-1495’s response helpful. We have this great thread dedicated to a similar issue. You can refer this if things are not clear.

Thanks,
Shubham Ranjan
Curriculum Services Engineer

Thanks, but I have tried the dbPath /var/mongodb/db, the mongod won’t start.

Thanks, I will check this thread

Hello,

I have the exact same problem, did you find a solution? Solved. Thanks :slight_smile:

Have you read the thread mentioned by ChangChien.Chang?

If you have the exact same problem the same solution should also work for you.

Even in the following post from this thread might be the solution.

1 Like

Hi, problem solved, after I figured out the differences between var/mongodb/db and /var/mongodb/db. also make sure the user has the required privilege of the sub directories, hope this helps!

1 Like

Thanks @ChangChien.Chang for providing your inputs.

Hi @Ana_20174,

I’m glad your issue got resolved. I’m closing this thread. If you have any other issue then please feel free to create another thread :slight_smile: .

Thanks,
Shubham Ranjan
Curriculum Services Engineer