digital-ocean - 次要阅读偏好
问题描述
我正在尝试在 Digital Ocean ubuntu 服务器中执行 mongodump。我收到以下错误。
root@Project:~# sudo mongodump --db <database> --out /root/backup/Localdb
2018-11-07T06:28:09.177+0000 Failed: error getting collections for database `<database>`: error running `listCollections`. Database: `<database>` Err: not authorized on `<database>` to execute command { listCollections: 1, cursor: {}, $readPreference: { mode: "secondaryPreferred" }, $db: `<database>` }
如何解决这个问题。
谢谢。
解决方案
推荐阅读
- javascript - 返回 html 字符串并将其插入到 title 属性时正确处理通过 JSON 发送的文本
- ruby-on-rails - 成功上传多个图像和如下格式后,如何从carrierwave获取这些网址?
- git - git-rebase 删除文件,但痕迹保留在 git-rev-list
- python - 将文件输入的行读入Python中的多个列表
- php - 在数据库中找不到记录
- google-apps-script - 有没有可以写在谷歌表格中的脚本,可以“复制到剪贴板”?
- pdf-generation - 在android上打开时生成PDF无效文件格式
- excel - 删除字符串中随机位置的已定义字符
- android - 如何在 Android Studio 中使用我的上传密钥(没有密钥库)签署我的 android 应用程序包?
- python - 使用 Python 按比例计算所有权