Home > Database > Mysql Tutorial > [Mongo学习小记]用户管理

[Mongo学习小记]用户管理

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 14:58:45
Original
1189 people have browsed it

[Mongo学习小记]用户管理 Mongo学习之用户管理 在Mongo中,添加一个用户主要注意有以下几个点: 1.超级用户需要在admin库下面建立权限: db.addUser(username,passwd) 2.单库用户需要在所需要连接的库内建立 use Pro_test db.addUser(username,passwd) 3.登

[Mongo学习小记]用户管理

 

Mongo学习之用户管理

在Mongo中,添加一个用户主要注意有以下几个点:

 

1.超级用户需要在admin库下面建立权限:

db.addUser('username','passwd')

 

2.单库用户需要在所需要连接的库内建立

use Pro_test

db.addUser('username','passwd')

 

3.登陆验证一下:

db.auth('username','passwd'),返回1的话证明验证成功

 

Mongo学习之副本集

 

1. 在Mongodb中,副本集中只能最多拥有12台机器,并且只有7台可以作为表决机。超过这个数量就要考虑使用简单的主从了 

 

2. 副本集中的成员分为以下几类:

永久第二副本集成员、隐藏成员、延迟成员、裁判、没有投票权的成员
 

Related labels:
Statement of this Website
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
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template