在Ubuntu上通过Compass加载MongoDB Atlas时出错

时间:2020-07-30 01:15:55

标签: node.js mongodb express ubuntu-18.04

最近下载了适用于Ubuntu的MongoDB Compass,然后我从MongoDB Atlas复制了连接字符串,以使用MongoDB Compass进行连接。当我打开MongoDB指南针时,它检测到我接受的连接字符串。我必须输入数据库的用户名和密码,并确保已授予它readWrite访问权限,然后将身份验证数据库设置为admin。然后我单击了“连接”按钮,似乎已连接,但出现此错误:

"An error occurred, while loading navigation:(Unauthorized) not authorized on adminto execute command {hostInfo: 1, $clusterTime: { clusterTime:{15968188 1}, signature:{hash:{0 [20 202 80 145 95 128 153 13 117 177 59 15 72 163 143 56 16 217 179 110]}, keyId: 6854717737982230528.0000000 }}, Isid: {4 [140 166 93 131 187 215 73 247 156 156 59 49 80 208 94 140]} } }".

我知道已连接到MongoDB,因为我能够从罗盘应用程序创建新数据库,但是无法从罗盘应用程序看到我的DBS和COLLECTIONS。 The screenshot of the error.

2 个答案:

答案 0 :(得分:0)

阅读这篇文章后,我也更新了我的MongoDB Compass。现在它又可以工作了。我在Windows 64b上使用带有MongoDB Compass的免费层MongoDB Atlas,并且两年后它才停止工作。因此,约翰·罗斯伯格(John Rossberg)提供了正确的答案,并且在答案中添加了答案,那就是免费版本退出了与较旧的MongoDB Compass的合作。我的旧版本是1.14.6。现在,它可以与MongoDB Compass 1.22.1一起再次使用,而无需对Atlas帐户进行任何修改。 MongoDB Compass 1.14.6仍然会引发错误。

答案 1 :(得分:-1)

我通过更新到最新版本的MongoDB Compass解决了这个问题