用pymongo连接mongodb,操作时报错:pymongo.errors.OperationFailure: not authorized on test to execute command

创建连接对象时,用client = pymongo.MongoClient('mongodb://user:password@localhost:27017/')这样的方式,增加权限认证

猜你喜欢

转载自www.cnblogs.com/Wang-Y/p/9371143.html