I am trying to create a db user from Python with pymongo. But I keep getting pymongo.errors.OperationFailure: CMD_NOT_ALLOWED: createUser error
client = MongoClient("mongodb+srv://username:[email protected]/admin")
db = client["testDB"]
db.command("createUser", "user", pwd="password")
am I missing something? Thanks.
Note: my db is on Mongo Atlas don't know if this changes anything.