Home:ALL Converter>How to change dbpath location of mongodb on Windows 10?

How to change dbpath location of mongodb on Windows 10?

Ask Time:2020-06-05T21:34:32         Author:user3848207

Json Formatter

I have installed mongodb 4.2 on my Windows 10 PC. It is installed in C:\Program Files\MongoDB\Server\4.2. It seems the dbpath which is the database location is by default at data folder. I would like to change dbpath to C:\Users\xx\Dropbox\mongodb_data. How can this be done on Windows 10? The information found on the net are for linux machines.

Author:user3848207,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/62216577/how-to-change-dbpath-location-of-mongodb-on-windows-10
yy