When I'm trying to install MongoDB Community edition on windows 8.1, I'm getting below error.
I tried most of the available solution from the internet but none of them worked.
I resolved this issue by installing Microsoft Visual C++ Redistributable 2019.
You can download it from the link below.
https://www.itechtics.com/microsoft-visual-c-redistributable-versions-direct-download-links/
I had the same problem!
Probably you're trying to install MongoDB in a custom folder.(for ex. C:\mongodb)
Don't do that!
Let the setup program install mongoDB on the default Program Path.(Usual path -> C:\Program Files\MongoDB\Server\4.2
)
After you've installed it, you can copy the content of these folder and past it to your intended custom folder. (In this example -> C:\mongodb
)
After you've done this you shouldn't get any more errors when you start mongo on a command shell.
In my case, I was changing the path in which the data and log folders were stored and the installer was not intelligent enough to auto-create the target paths. So after manually creating each set of folders and restarting the installation, version 4.0.10 installed without error.
I grappled with the same issue for a while until I realized that my problem is the installation location. You are most likely to run into this error if you install MongoDb in this folder: C:\MongoDB
. I resolved it by installing in the default folder which is C:\Program Files\MongoDB\Server\4.0\bin
Ten hours of work, nothing from above work for me except the following:
C:\mongodb\bin
as administrator and input mongod
. You'll see that it was interrupted.mongod --remove
.mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath C:\mongodb\log\mongo.log --install
net start MongoDB
to verify it works correctlyGoto "C:\mongodb\bin" and Open "mongod.cfg", Then Search for :#mp
Just remove the text :#mp from the file (you will find :#mp where the content of the file ends).
Now Run : net start mongodb. This should work now.
I had been struggling for the same, a whole day finally came up with this solution. I have window 8.1...
...initialText;path
wherepath
is the where your MongoDB was installed with thebin
folder in the same. By default itsC:\Program Files\MongoDB\Server\4.2(your version)\bin
edit like this initialText;C:\Program Files\MongoDB\Server\4.2\bin
click ok close.
Try running mongod
in cmd prompt it will show an error and will close.
Error will say to create a folder C:\data\db
manually. Do it.
You're all set try running 'mongod' again.
You're welcome!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With