all
This commit is contained in:
+10
-2
@@ -6,11 +6,19 @@ $ mongo
|
||||
> use admin
|
||||
> db.createUser({
|
||||
user: "root",
|
||||
pwd: "root",
|
||||
pwd: "123456",
|
||||
roles: [ { role: "userAdminAnyDatabase", db: "admin" }]
|
||||
}
|
||||
)
|
||||
|
||||
db.auth('root', '123456')
|
||||
db.createUser({
|
||||
user: "light",
|
||||
pwd: "123456",
|
||||
roles: [ { role: "root", db: "admin" }]
|
||||
}
|
||||
)
|
||||
# mongodb://light:123456@127.0.0.1:27017/
|
||||
# mongodb://tester:xyz123@127.0.0.1:27017/test
|
||||
use test
|
||||
db.createUser(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user