database - 当 db 在 diff (27020) 端口中创建时,无法从 robo3T 访问 mongodb 集合。(能够连接到 db 但不能连接到 coll)
问题描述
error_img config_27017 config_27020 我正在尝试从一个数据库中提取数据(在端口 27017 中运行)并将提取的数据存储在另一个数据库中(27020)。对于第一个分贝,我设置了身份验证,但没有为第二个分贝设置。我在 aws 实例中安装了 mongodb。我在不同的端口(即 27017、27020)中创建每个数据库。为每个端口创建单独的 mongo_config 文件。能够从 robo3T 访问新创建的数据库,但是访问集合会出现以下错误:
**Error "ListCollection failed: {ok: 0.0, errmsg: "not authorized on <db> to execute command {listCollection:1, filter: {}, cursor: {}, $readPreference: {mode: "secondaryPreferred"}. $d..". code:13, codeName: "Unauthorized"}"}**
请建议我创建 2 个 mongo 实例的步骤,在一台服务器上监听 2 个不同的端口。
解决方案
推荐阅读
- html - 序列化下拉列表
- ldap - 使用 OpenLDAP 设置 LDAP 授权
- python - 我应该怎么做才能在 Heroku 上使用 python-magic?
- linux-kernel - 进程控制块的文件格式是什么?
- qt - 如何更改 vlc-qt 媒体显示小部件?
- c# - 如何在 WinForms 中使用 GraphicsPath 填充不同颜色的椭圆?
- google-maps - Googlemaps 中的图像生成器
- jquery - 使用 jquery 从 umbraco 表单中获取变量
- jupyter - 在 Google Colab jupyter notebooks 中为动态生成的文件创建文件下载链接
- angular - 第二次没有在离子中调用函数