use <databasename>
use sessions
use <databasename> db.createUser( { user: "<username>", pwd: "<password>", roles: [ { role: "dbOwner", db: "<databasename>" } ] } )
This user must be granted with the dbOwner role to be able to perform any administrative action on the database.
use sessions db.createUser( { user: "session-user", pwd: "suser", roles: [ { role: "dbOwner", db: "sessions" } ] } )
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!