更新时间:2022-02-01 15:06:45
设置用户后,需要使用--auth
选项启动mongod
.
You need to start mongod
with the --auth
option after setting up the user.
从MongoDB站点:
From the MongoDB Site:
使用
--auth
选项运行数据库(mongod进程)以启用 安全.您必须先将用户添加到admin数据库中 使用--auth
启动服务器,或从 本地主机接口.
Run the database (mongod process) with the
--auth
option to enable security. You must either have added a user to the admin db before starting the server with--auth
, or add the first user from the localhost interface.