Getting started with MongoDB and ran into a missing data/db directory issue. Does this directory always need to be created manually when starting a mongod process?
Its easy to set the data path . Just run mongod using this commands. Yeah ! You need to create a data folder and enter that in the below path
First go the bin directory
cd c:/mongodb/server/3.2/bin
Then run using this command . It will set the path of your data
mongod --dbpath c:\data
Sandeep Panda
co-founder, Hashnode
Yes, you need to create a directory which will be used by MongoDB for data storage. For example, you can manually create a directory called
~/data/mongodataand start MongoDB asmongod --dbpath ~/data/mongodata.