Skip to main content

MongoDB User(Role)


User

User 생성

// use <database>

db.createUser({
user: "<user>",
pwd: "<password>", // or passwordPrompt()
roles: [
// "<role>",
{ role: "<role>", db: "<database>" },
],
});

User에 Role 부여하기

Role

사전 정의된 Role