Pymongo can't connect to the mongo cluster. It's fine even locally.

problem description

pymongo cannot connect to the mongo cluster, even locally is fine.
everything is fine on the command line.

the environmental background of the problems and what methods you have tried

Local mongo has no authentication, but the cluster has permission to verify.

everything is fine on the command line

  https://api.mongodb.com/pytho. check is fine. 

Local is 3.0, and cluster 3.6 should be the default SCRAM-SHA-1 mechanism

.

what should I do with it?

Jun.16,2021

  1. check whether there are special symbols in the password, such as @,:
  2. SCRAM-SHA-1 authentication is used in the stack. Check whether your account is MONGODB-CR :
  3. .
use admin
db.system.users.find()
Menu