Connection to MongoDB fails -
i tried connect local mongodb instance, failed error message failed connect.
i have run commands shown in below screenshots. error message shown there, too.
my folder structure is:
- d:/mongodb/bin
- d:/mongodb/data/db
- d:/mongodb/log
i using 32-bit windows7.
your data directory doesn't exist mongodb expecting be.
for simplicity can create d:/data/db, default location , mongod looking @ moment, , use data directory.
alternatively if want use d:/mongodb/data/db data directory you'll need specify dbpath when starting mongod
mongod --dbpath d:/mongodb/data/db this can done in configuration file.

Comments
Post a Comment