Saber2pr's Blog

AddADatabaseAdministrator

Switch to admin

use admin

Add Super Admin

db.createUser({
  user: 'root',
  pwd: '123456',
  roles: [{ role: 'root', db: 'admin' }],
})