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

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

posted @ 2018-07-26 12:50  WY~记录  阅读(5276)  评论(0编辑  收藏  举报