Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

mongodb create admin user for all databases

use admin
db.createUser({ user: "mongoadmin" , pwd: "mongoadmin", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})
Comment

mongodb add user

use <your database>
db.createUser({
  user: '<some username>',
  pwd: passwordPrompt(),
  roles: [{
    role: 'readWrite',
    db: '<your database>'
  }]
})
Comment

create admin user in mongodb

use admin
db.createUser(
      {
          user: "username",
          pwd: "password",
          roles: [ "root" ]
      }
  )
Comment

mongodb add admin user

use admin
db.createUser({
  user: "username",
  pwd: "password",
  roles: [ "root" ]
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript recursive sum function 
Javascript :: express cors error 
Javascript :: dotenv nodejs 
Javascript :: replace string in javascript 
Javascript :: count div class in div jquery 
Javascript :: alert.alert react native style 
Javascript :: react flip move 
Javascript :: laravel query json 
Javascript :: how to run nextjs in another port 
Javascript :: javascript rotate image canvas 
Javascript :: jquery bind click 
Javascript :: pdf table files download react not working 
Javascript :: what is the use of angularjs 
Javascript :: store data in array jquery 
Javascript :: video preview javascript 
Javascript :: socket io client 
Javascript :: js exec find all 
Javascript :: javascript querySelectorAll id ends with 
Javascript :: javascript domcontentloaded 
Javascript :: finding by sub property of an object in mongo 
Javascript :: generate random whole number between 2 javascript 
Javascript :: how to show day name in javascript using array 
Javascript :: jquery array 
Javascript :: concat array of objects javascript 
Javascript :: find lowest number in array js 
Javascript :: get last item in array 
Javascript :: eas build apk 
Javascript :: js get option value 
Javascript :: nodejs current timestamp unix 
Javascript :: Check ratelimit discord js 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =