M M
M M

Reputation: 87

mongodb won't start mongod -> error dbpath does not exists, but the path does exit

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

Upvotes: 2

Views: 8579

Answers (2)

user3017752
user3017752

Reputation: 11

worked for me to make a map in windows explorer and then run mongod. But it needs to be the drive where mongo is installed c:\data\db and not in for example e:\data\db

Upvotes: 1

Andrei Beziazychnyi
Andrei Beziazychnyi

Reputation: 2917

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

 mongod --dbpath c:\data\db

Upvotes: 7

Related Questions