我有 python 2.7,有 pymongo 3.4
我正在尝试使用以下方法连接到 mongo atlas:
import certifi
import ssl
import os
from pymongo import MongoClient
MongoClient(
"mongodb://Admin:<PASSWORD>@ABC-shard-00-00-XYZ:27017",
"ABC-shard-00-01-XYZ:27017",
"ABC-shard-00-02-XYZ:27017/dev?ssl=true&replicaSet=ABC-0&authSource=admin",
ssl_cert_reqs=ssl.CERT_REQUIRED,
ssl_ca_certs=certifi.where()
)
它不断失败,身份验证失败。代码 18