How do I set mongo db dbpath on windows 7? I created a directory in my my C drive as data/db but it is not working.
The mongodb data dir is not application specific. It is mongod.exe
process specific.
As documentation says
By default MongoDB will store data in \data\db, but it won't automatically create that folder, so we do so here:
C:\> mkdir \data C:\> mkdir \data\db Or you can do this from the Windows Explorer, of course.
If you prefer to place datafiles elsewhere, use the --dbpath command line parameter when starting mongod.exe.
This means that you need to create C:\data\db
directory or start mongod.exe
with the full path to your data dir as --dbpath
parameter value.