Answers for "mongodb 3.6.8 add authentication to database"

1

create admin user in mongodb

use admin
db.createUser(
      {
          user: "username",
          pwd: "password",
          roles: [ "root" ]
      }
  )
Posted by: Guest on April-19-2020
-1

mongodb add admin user

use admin
db.createUser({
  user: "username",
  pwd: "password",
  roles: [ "root" ]
})
Posted by: Guest on July-17-2020

Code answers related to "mongodb 3.6.8 add authentication to database"

Code answers related to "Javascript"

Browse Popular Code Answers by Language