Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ultimate-member domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /ledcorps/www/wp/wp-includes/functions.php on line 6114 MongoDB 인증 추가하기 – 대나무숲

MongoDB 인증 추가하기

인증하기

$ mongo # 또는
$ mongosh

> use admin
switched to db admin
> show users # 인증해야 사용 가능
MongoError: command usersInfo requires authentication

> db.auth("admin", "admin1234!!") # 인증
{ ok: 1 }

> show users # 사용 가능
[
  {
    _id: 'admin.admin',
    userId: UUID("184a8c56-abe0-4442-aadc-333e1a1d6a78"),
    user: 'admin',
    db: 'admin',
    roles: [ { role: 'admin', db: 'admin' } ],
    mechanisms: [ 'SCRAM-SHA-1', 'SCRAM-SHA-256' ]
  }
]

출처

MongoDB 공식 가이드 – https://docs.mongodb.com/guides/server/auth/


답글 남기기 0

Your email address will not be published. Required fields are marked *