简体   繁体   English

当我尝试在Windows Server 2008中安装64位mongodb时出现“访问被拒绝”

[英]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\\ 我要做的就是在脚本下运行: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) (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. 当我在32位Windows Server 2003中安装32位mongodb时,我没有遇到这样的问题。

I appreciate any help about this! 我对此表示感谢!

您需要从使用Run as Administrator选项打开的命令提示符下安装它

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.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM