Horje
mongodb create user Code Example
mongodb add user
use <your database>
db.createUser({
  user: '<some username>',
  pwd: passwordPrompt(),
  roles: [{
    role: 'readWrite',
    db: '<your database>'
  }]
})
mongodb create admin user
use admin
db.createUser({ user: "mongoadmin" , pwd: "mongoadmin", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})
mongo create user
db.createUser(
  { 
    user: "user_name", 
    pwd: "password", 
    roles: [
      "userAdminAnyDatabase", 
      "dbAdminAnyDatabase", 
      "readWriteAnyDatabase"
    ]
  }
)
mongodb create user
use admin
db.createUser(
   {
     user: "restricted",
     pwd: passwordPrompt(),      // Or  "<cleartext password>"
     roles: [ { role: "readWrite", db: "reporting" } ],
     authenticationRestrictions: [ {
        clientSource: ["192.0.2.0"],
        serverAddress: ["198.51.100.0"]
     } ]
   }
)




Whatever

Related
bootstrap cdn css Code Example bootstrap cdn css Code Example
error: src refspec main does not match any Code Example error: src refspec main does not match any Code Example
android add back button to toolbar programmatically Code Example android add back button to toolbar programmatically Code Example
flutter change android default font size Code Example flutter change android default font size Code Example
bootstrap daterangepicker remove default date Code Example bootstrap daterangepicker remove default date Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7