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

StackOverflow https://stackoverflow.com/questions/23631673

  •  21-07-2023
  •  | 
  •  

Question

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

Était-ce utile?

La solution

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

 mongod --dbpath c:\data\db

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top