I want to use MongoDB Compass on Windows 7 to manage my data, but I cannot figure out how to change the data directory.
I have used the command
mongod --dbpath="C:\Program Files\MongoDB\Server\4.0\test"
But when I use Compass to add a new database or a collection, nothing appears in "test" folder. Instead, I got new files added in "C:\Program Files\MongoDB\Server\4.0\data", which I believe is the default directory?
I think the command is not successfully executed but I don't know what to do.See screenshot
I have also tried to modify the mongodb.cfg which is located in "C:\Program Files\MongoDB\Server\4.0\bin". But it does not work either.
Can anyone help please? Thanks in advance.