【问题标题】:Add authentication to mongod.conf file [duplicate]向 mongod.conf 文件添加身份验证 [重复]
【发布时间】:2016-02-07 08:22:26
【问题描述】:

如何向我的 mongod.conf 文件添加身份验证,这样我就不必在每次启动 mongod 守护程序时都指定运行 mongod --auth

【问题讨论】:

标签: mongodb database


【解决方案1】:

编辑 /etc/mongod.conf

添加或查找security: 部分 并在其下方添加authorization: enabled,如下所示:

security:
  authorization: enabled

保存并重新启动不带--auth 的守护程序

【讨论】:

  • 仅适用于 YAML 配置文件。
猜你喜欢
  • 1970-01-01
  • 2014-11-28
  • 2017-04-04
  • 1970-01-01
  • 2020-08-21
  • 1970-01-01
  • 2021-04-05
  • 2017-11-04
  • 1970-01-01
相关资源
最近更新 更多