MongoDB Access Control Supporting tagline
先创建根用户
可以通过两种方式创建根用户,
1.已经存在根用户
2.开启 enableLocalhostAuthBypass=1 选项
Add User to a db
> use test
> db.addUser({user:"Alice",pwd:"Moon1234",roles:[ "readWrite","dbAdmin"]})
Published
06 September 2013