Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

mongo create admin code example

Example 1: create admin user in mongodb

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

Example 2: mongodb add admin user

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

Tags:

Shell Example

Related

bootstrap 3 center image vertically code example java sum digits of number code example spring logging framework cloud code example m5.xlarge instance type code example latex change font size outside of equation code example insert date in mysql table code example r dataframe set column names code example how to access string elements using index number in Javascript code example string.toupper in java code example how to output c++ code example laravel uri segment code example css any sibling code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy