mongodb 4.2
1.创建用户
db.createUser({ user:"db_python", pwd:"**..!123", roles:[{ role:"dbOwner", db:"db_python"}]})
2.删除用户
db.dropUser('db_python',{w:"majority", wtimeout:5000})
3.查看用户
show users
mongodb 4.2
1.创建用户
db.createUser({ user:"db_python", pwd:"**..!123", roles:[{ role:"dbOwner", db:"db_python"}]})
2.删除用户
db.dropUser('db_python',{w:"majority", wtimeout:5000})
3.查看用户
show users