Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service 'MongoDB Server'(MongoDB) failed to start.Verify that you have sufficient privileges to start system services

When I'm trying to install MongoDB Community edition on windows 8.1, I'm getting below error.

enter image description here

I tried most of the available solution from the internet but none of them worked.

like image 294
Vilas D. Avatar asked Oct 18 '18 15:10

Vilas D.


7 Answers

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/

like image 145
ax1o Avatar answered Nov 15 '22 11:11

ax1o


I had the same problem!

Probably you're trying to install MongoDB in a custom folder.(for ex. C:\mongodb)

Don't do that!

  1. Let the setup program install mongoDB on the default Program Path.(Usual path -> C:\Program Files\MongoDB\Server\4.2)

  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)

  3. After you've done this you shouldn't get any more errors when you start mongo on a command shell.

like image 26
Albin Ademi Avatar answered Nov 15 '22 12:11

Albin Ademi


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.

like image 41
sean2078 Avatar answered Nov 15 '22 13:11

sean2078


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

like image 42
Pholoso Mams Avatar answered Nov 15 '22 11:11

Pholoso Mams


Ten hours of work, nothing from above work for me except the following:

  1. make your custom directory for instance C:\mongodb
  2. give full access permission by right click it, properties at security widget for all groups and users.
  3. inside make catalog data and inside it catalog db
  4. install MongoDB with msi installer, select custom and select the created directory C:\mongodb as installation path.
  5. When at installation you receive the mentioned error, select Ignore.
  6. Run command prompt at C:\mongodb\bin as administrator and input mongod. You'll see that it was interrupted.
  7. Remove current MongoDB service by executing mongod --remove.
  8. Execute the following: mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath C:\mongodb\log\mongo.log --install
  9. Execute net start MongoDB to verify it works correctly
  10. Enjoy
like image 40
Yoel Shafir Avatar answered Nov 15 '22 12:11

Yoel Shafir


Goto "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.

like image 34
Abhishek Kumar Avatar answered Nov 15 '22 12:11

Abhishek Kumar


I had been struggling for the same, a whole day finally came up with this solution. I have window 8.1...

enter image description here

  1. when this screen pops up! click 'ignore' here(it will close)
  2. open 'View Advanced System Settings'(search for it in win menu).
  3. In 'Advance' tab at the bottom, Click 'Environment Variables', open that.
  4. Now look for path variable in system variable and the other, Select path variable and click edit.
  5. Now at the end of variable add the following...

...initialText;path where path is the where your MongoDB was installed with the bin folder in the same. By default its C:\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!

like image 39
Utkarsh Dhiman Avatar answered Nov 15 '22 13:11

Utkarsh Dhiman