开发者社区> 问答> 正文

db.shutdownServer()报错,求助。

在学mongodb。版本是version: 3.0.6
> use admin
switched to db admin
> db.auth('super','super');
1
> show dbs
`admin 0.078GB
local 0.078GB
test 0.078GB`
> db.shutdownServer();
assert failed : unexpected error: Error: shutdownServer failed: not authorized on admin to execute command { shutdown: 1.0 }
Error: assert failed : unexpected error: Error: shutdownServer failed: not authorized on admin to execute command { shutdown: 1.0 }

at Error (<anonymous>)
at doassert (src/mongo/shell/assert.js:11:14)
at assert (src/mongo/shell/assert.js:20:5)
at DB.shutdownServer (src/mongo/shell/db.js:212:9)
at (shell):1:4

2016-04-15T08:08:53.788+0800 E QUERY Error: assert failed : unexpected error: Error: shutdownServer failed: not authorized on admin to execute command { shutdown: 1.0 }

at Error (<anonymous>)
at doassert (src/mongo/shell/assert.js:11:14)
at assert (src/mongo/shell/assert.js:20:5)
at DB.shutdownServer (src/mongo/shell/db.js:212:9)
at (shell):1:4 at src/mongo/shell/assert.js:13

请问这个错误怎么解决?

展开
收起
落地花开啦 2016-02-25 17:30:11 4966 0
1 条回答
写回答
取消 提交回答
  • 喜欢技术,喜欢努力的人

    没权限
    not authorized on admin to execute command { shutdown: 1.0 }

    2019-07-17 18:47:44
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
SQL Server 2017 立即下载
Greenplum DB 5.0 Roadmap 立即下载
HTAP DB HTAP DB —System : ApsaraDB HBase Phoenix and Spark 立即下载