** WARNING: Access control is not enabled for the database.

1. createUser

use admin
db.createUser(
  {
    user: "root",
    pwd: "xxxxxx",
    roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
  }
)

2. Enable Auth

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注