Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Got "Access is denied" when I tried to install 64-bit mongodb in Windows server 2008

All I did is to run below script: D:\Tools\MongoDb\bin\mongod.exe --dbpath D:\MongoDb\data\

Then I got exception: Error connecting to the service Control Manager: Access is denied. (5)

I was using administrator account to operate this, I already created folders related to the script.

And I didn't experience issue like this when I installed 32-bit mongodb in 32-bit Windows Server 2003.

I appreciate any help about this!

like image 640
Diego Cheng Avatar asked Nov 04 '10 16:11

Diego Cheng


2 Answers

From Admin command prompt execute:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>cd C:\Program Files\MongoDB\Server\3.6\bin

C:\Program Files\MongoDB\Server\3.6\bin>mongod.exe -config "c:\data\mongod.cfg" -install
2018-03-20T08:55:00.541+0530 I CONTROL  [main] log file "c:\data\log\mongod.log"
 exists; moved to "c:\data\log\mongod.log.2018-03-20T03-25-00".

C:\Program Files\MongoDB\Server\3.6\bin>net start MongoDB
The MongoDB service is starting..
The MongoDB service was started successfully.
like image 35
Baiju Chandran Avatar answered Sep 21 '22 19:09

Baiju Chandran


You need to install it from the command prompt that you have opened with the Run as Administrator option

like image 173
Woot4Moo Avatar answered Sep 22 '22 19:09

Woot4Moo