mongodb windows install

mongodb windows install

下载  mongodb-win32-x86_64-2008plus-ssl-3.4.5-signed.msi

1.安装install 



 

本人安装位置 D:\soft\MongoDB



 

2. install 命令

mongod.exe --logpath D:\soft\MongoDB\data\log\mongodb.log --logappend --dbpath D:\soft\MongoDB\data\db --directoryperdb --serviceName MongoDB -install

出现 就算成功了

2018-03-21T14:27:57.734+0800 I CONTROL  [main] Trying to install Windows service 'MongoDB'
2018-03-21T14:27:57.736+0800 I CONTROL  [main] Error connecting to the Service Control Manager: 拒绝访问。 (5)
2018-03-21T14:32:29.834+0800 I CONTROL  [main] ***** SERVER RESTARTED *****
2018-03-21T14:32:30.336+0800 I CONTROL  [main] Trying to install Windows service 'MongoDB'
2018-03-21T14:32:30.560+0800 I CONTROL  [main] Service 'MongoDB' (MongoDB) installed with command line 'D:\soft\MongoDB\Server\3.4\bin\mongod.exe --logpath D:\soft\MongoDB\data\log\mongodb.log --logappend --dbpath D:\soft\MongoDB\data\db --directoryperdb --service'
2018-03-21T14:32:30.560+0800 I CONTROL  [main] Service can be started from the command line with 'net start MongoDB'

出现 以下错误是权限问题,在系统  C:\Windows\System32 下右击 cmd.exe 以管理员身份启动

 2017-07-07T17:01:55.339+0800 I CONTROL  [main] Error connecting to the Service Control Manager: 拒绝访问。 (5)

在执行intall 命令

3.启动 

net start MongoDB
net stop MongoDB



 

4.进入客户端



 

5.test

> db.runoob.insert({x:10})
WriteResult({ "nInserted" : 1 })



 

6.使用 Robomongo 0.9.0 可视化 工具查看



 

捐助开发者 

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(支持支付宝和微信 以及扣扣群),没钱捧个人场,谢谢各位。

 

个人主页http://knight-black-bob.iteye.com/



 
 
 谢谢您的赞助,我会做的更好!

猜你喜欢

转载自knight-black-bob.iteye.com/blog/2414127