Home >Database >Mysql Tutorial >mongodb安装成服务及账号建立

mongodb安装成服务及账号建立

WBOY
WBOYOriginal
2016-06-07 16:32:27871browse

一、安装成服务 1、解压mongodb-win32-x86_64-2.4.6.zip到 D:\mongodb 2、在D:\mongodb下创建目录data 与 logs 3、在D:\mongodb\logs下创建mongodb.log文件 4、配置为服务 1)开始运行cmd 2)cd D:\Mongodb\bin 3)D:\Mongodb\binmongod logpath D:\MongoDB\log

一、安装成服务

1、解压mongodb-win32-x86_64-2.4.6.zip到 D:\mongodb

2、在D:\mongodb下创建目录data 与 logs

3、在D:\mongodb\logs下创建mongodb.log文件

4、配置为服务

1)开始–运行–cmd

2)cd D:\Mongodb\bin

3)D:\Mongodb\bin>mongod –logpath D:\MongoDB\logs\MongoDB.log –logappend –dbpath D:\MongoDB\data –directoryperdb –serviceName MongoDB –install

4) net start mongodb

二、账号建立
1,利用mongoVUE连接上去,在admin的users建立账号
2,让mongodb进入授权模式,在启动时增加参数auth
net stop mongodb
sc delete mongodb
mongod –logpath D:\MongoDB\logs\MongoDB.log –logappend –dbpath D:\MongoDB\data –directoryperdb –serviceName MongoDB –install –auth

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn