Reputation: 73
what can I do to solve this problem? I'm on windows so I can't run sudo mongo I tried to do "runas" in windows instead of linux "sudo" but it didn;t help me out. I was looking for a fle called monogod.lock to remove it but didn't find something like that...I tried mongo repair but it also didn't help me...help someone?
btw...I tried to start mongo.exe from it's directory in another CMD but it failed also:
Upvotes: 1
Views: 5010
Reputation: 1
1.- In the terminal
$ sudo systemctl start mongodb
$ mongo
Upvotes: 0
Reputation: 73
oh guys I finally got that! when you run mongod.exe on windows you should also give it the path of the directory if not it won't work! if somehow you'll have a mongod.lock on your directory you should delete this file than write on CMD mongod.exe repair and start running it again! thanks to all =]
Upvotes: 0
Reputation: 2005
Seems you have not started the Mongo DB Server. Do the followings.
Check this link which might help you.
MongoError: failed to connect to server [localhost:27017] on first connect
Upvotes: 1