Answers for "mongodb connecting to admin database but there is no admin database"

0

mongodb create admin user for all databases

use admin
db.createUser({ user: "mongoadmin" , pwd: "mongoadmin", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})
Posted by: Guest on March-13-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 connecting to admin database but there is no admin database"

Code answers related to "Javascript"

Browse Popular Code Answers by Language