【发布时间】:2014-08-22 03:20:36
【问题描述】:
使用 mongo 客户端,我可以使用我的管理员帐户成功验证:
$ mongo -u my_admin_username -p my_admin_pass --authenticationDatabase admin
MongoDB shell version: 2.6.3
connecting to: test
>
但是当我尝试使用相同的凭据执行 mongorestore 时,它会失败:
$ mongorestore -u my_admin_username -p my_admin_pass /backup/20140821/db/myproject/
connected to: 127.0.0.1
assertion: 13 not authorized on admin to execute command { getParameter: 1, authSchemaVersion: 1 }
这是为什么呢?我错过了什么?我想成功执行一个 mongorestore。
【问题讨论】:
标签: mongodb mongorestore