I tried start mongod.exe but it wouldn't open.
Asked
Active
Viewed 8,616 times
0
-
Possible duplicate of [MongoDB on a Windows 7 machine: No connection could be made](http://stackoverflow.com/questions/23726684/mongodb-on-a-windows-7-machine-no-connection-could-be-made) – Smita Ahinave Aug 22 '16 at 12:57
-
@sss nope, different solution – Callum Aug 22 '16 at 13:22
-
ohh really..see http://stackoverflow.com/a/28593287/5735460 – Smita Ahinave Aug 23 '16 at 04:29
-
I'm having the same problem but connection to remove windows server – RollRoll Jul 12 '18 at 00:27
2 Answers
2
the problem was that there was no "db" folder in my data folder. I just added the folder and now it's fully operational.

Callum
- 139
- 1
- 13
0
mongod --dbpath "C:\Program Files\MongoDB\Server\4.0\data"
As per the error message I tried it and this code worked. Make sure you start command prompt in Administrator mode.

Enos jeba
- 72
- 1
- 3
- 10