MongoDB DBA · Question 384 · Single choice

Which of the following applies to the localhost exception? Choose the best answer:

Answer options

  1. A.
    You can create the first user via localhost after enabling authorization but prior to any other user being created.
  2. B.
    You can only create the first user prior to enabling authentication.
  3. C.
    You can bypass authorization any time you connect to MongoDB via localhost
  4. D.
    You need to use the default mongod password to create the first user on the mongod.
  5. E.
    After turning on authentication, but prior to enabling authorization, you may create a user.

Answer confidence: High

Correct answer: A

Explanation language: Chinese

localhost exception 的准确定义是:已启用 authorization 但集群中还没有任何用户时,可以只从本机(localhost)连接创建第一个用户(通常是 admin 库的管理员)。它不是随时可用的授权后门(B 错),不需要什么默认密码(C 错),也不要求在开启认证之前创建(D 错)。

Papers containing this question

This question appears in 2 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗