Node.js – mongodb won’t start mongod -> error dbpath does not exists, but the path does exit

mongodbnode.js

i'm having trouble starting my mongodb. I've installed it yesterday and even have put some records in the db. But later when I wanted to go further with the project and tried to start the db again it wouldn't start.

this is what I tried in my cmd (ps I'm using Windows 8 and i've turned off my firewall)
c:\mongo\bin>mongod –> error dbpath(\data\db) does not exist

c:\mongo\bin>mongo –> failed to connect to 127.0.0.1:27017 reason: errno:10061

c:\mongo\bin>mongo.exe –> failed to connect to 127.0.0.1:27017 reason: errno:10061

c:\mongo\bin>mongod.exe –> error dbpath(\data\db) does not exist

So generaly , it just keeps saying that the dbpath doesn't exist , but it does because in my c:\mongo\bin map i have a map data and in that map there is a map db

Best Answer

Try to explicitly specify path via --dbpath option or in config file, like this:

 mongod --dbpath c:\data\db
Related Topic