脚步:
通过localhost连接到mongo shell,
使用admin切换到db admin db.shutdownServer()断言失败:意外错误:“shutdownServer failed:unauthorized”错误:在printStackTrace上打印堆栈跟踪(src / mongo / shell / utils.js:37:15)atassert(src) /mongo/shell/assert.js:6:5)在DB.shutdownServer(src / mongo / shell / db.js:346:9)的assert(src / mongo / shell / assert.js:14:5)处(shell):1:4 Tue Nov 12 23:05:45.236断言失败:意外错误:“shutdownServer failed:unauthorized”在src / mongo / shell / assert.js:7
任何建议都会很棒 . 在我们启用身份验证后,这种情况就开始发生提前致谢!
1 回答
好吧,你没有验证
代替
试试这个 :
并确保db.admin上有一个用户
http://docs.mongodb.org/manual/reference/method/db.addUser/