gpt4 book ai didi

MongoDB 关闭失败,身份验证已打开

转载 作者:搜寻专家 更新时间:2023-10-30 23:11:14 25 4
gpt4 key购买 nike

步骤:

通过本地主机连接到 mongo shell,

use admin switched to db admin db.shutdownServer() assert failed : unexpected error: "shutdownServer failed: unauthorized" Error: Printing Stack Trace at printStackTrace (src/mongo/shell/utils.js:37:15) at doassert (src/mongo/shell/assert.js:6:5) at assert (src/mongo/shell/assert.js:14:5) at DB.shutdownServer (src/mongo/shell/db.js:346:9) at (shell):1:4 Tue Nov 12 23:05:45.236 assert failed : unexpected error: "shutdownServer failed: unauthorized" at src/mongo/shell/assert.js:7

任何建议都会很棒。这在我们打开身份验证后开始发生。提前致谢!

最佳答案

嗯,你没有认证

代替

mongo

use admin

试试这个:

mongo admin -u username -p password

并确保在 db.admin 上有一个用户

http://docs.mongodb.org/manual/reference/method/db.addUser/

关于MongoDB 关闭失败,身份验证已打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19941862/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com