Skip to content
ermiry edited this page Jul 5, 2021 · 1 revision

Mongo

Authenticate as the db admin

use admin

db.auth("admin", passwordPrompt())

Select the db

use test

Create Mongo DB user

db.createUser(
    {
      user: "api",
      pwd:  "password",
      roles: [ { role: "readWrite", db: "test" }]
    }
)

Clone this wiki locally