MongoDB中用户的角色说明

MongoDB中用户的角色说明

read

数据库的只读权限,包括:

aggregate,checkShardingIndex,cloneCollectionAsCapped,collStats,count,dataSize,dbHash,dbStats,distinct,filemd5,mapReduce (inline output only.),text (beta feature.)geoNear,geoSearch,geoWalk,group

readWrite

数据库的读写权限,包括:

    cloneCollection (as the target database.),convertToCapped,create (and to create collections implicitly.),renameCollection (within the same database.)findAndModify,mapReduce (output to a collection.) drop(),dropIndexes,emptycapped,ensureIndex() 

read的所有权限

dbAdmin

clean,collMod,collStats,compact,convertToCappe create,db.createCollection(),dbStats,drop(),dropIndexes ensureIndex(),indexStats,profile,reIndex renameCollection (within a single database.),validate 

userAdmin角色

数据库的用户管理权限

clusterAdmin角色

集群管理权限(副本集、分片、主从等相关管理),包括:

addShard,closeAllDatabases,connPoolStats,connPoolSync,_cpuProfilerStart_cpuProfilerStop,cursorInfo,diagLogging,dropDatabase 
shardingState,shutdown,splitChunk,splitVector,split,top,touchresync 
serverStatus,setParameter,setShardVersion,shardCollection 
replSetMaintenance,replSetReconfig,replSetStepDown,replSetSyncFrom 
repairDatabase,replSetFreeze,replSetGetStatus,replSetInitiate 
logRotate,moveChunk,movePrimary,netstat,removeShard,unsetSharding 
hostInfo,db.currentOp(),db.killOp(),listDatabases,listShardsgetCmdLineOpts,getLog,getParameter,getShardMap,getShardVersion 
enableSharding,flushRouterConfig,fsync,db.fsyncUnlock()

readAnyDatabase

任何数据库的只读权限(和read相似)

readWriteAnyDatabase

任何数据库的读写权限(和readWrite相似)

userAdminAnyDatabase

任何数据库用户的管理权限(和userAdmin相似)

dbAdminAnyDatabase

任何数据库的管理权限(dbAdmin相似)

__system
什么权限都有

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值