简体   繁体   English

无法使用 mongo 连接到 mongodb Atlas 集群 shell

[英]Cannot connect to mongodb Atlas cluster using mongo shell

I built my cluster, created database user, and contained my IP address to the whitelist.我构建了集群,创建了数据库用户,并将我的 IP 地址包含在白名单中。 But whenever I run this command, I get the following error.但是每当我运行此命令时,都会出现以下错误。

mongo "mongodb+srv://cluster0.vkqlr.mongodb.net/test" --username <my-username>

DNSProtocolError: Invalid record 0 of SRV answer for "_mongodb._tcp.cluster0.vkqlr.mongodb.net": Incorrect result size DNSProtocolError:“_mongodb._tcp.cluster0.vkqlr.mongodb.net”的 SRV 答案的无效记录 0:结果大小不正确

Please help me.请帮我。

You have some kind of DNS issue on your system.您的系统上有某种 DNS 问题。 Try another DNS resolver .尝试另一个 DNS 解析器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM