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

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

2018-07-26 12:50 0 3612 推荐指数:

查看详情

pymongo.errors.OperationFailure: Authentication failed.

mongoDB有不同的认证机制,3.0版本以后采用的是'MONGODB-CR', 之前的版本采用的是'MONGODB-CR'。 所以,以我的版本情况,显然应该用'SCRAM-SHA-1' ...

Sat Feb 16 00:36:00 CST 2019 0 1723
pymongo.errors.OperationFailure: Authentication failed.

原因:mongodb需要用户名、密码登录,认证失败。 mongoDB有不同的认证机制,3.0版本以后采用的是'SCRAM-SHA-1', 之前的版本采用的是'MONGODB-CR'。 根据自己的情况给mechanism赋值。 import pymongo client ...

Wed Apr 26 23:07:00 CST 2017 0 3496
python3操作pymongo报错pymongo.errors.ConfigurationError

第一次在mac使用python3连接mongo库。 1,确认是否已经安装了 python3 2,安装 pymongo 3,运用python脚本 结果报错: 查了很久没发现准确的解决办法。 后来在原window上查 ...

Thu Dec 16 04:48:00 CST 2021 0 893
用Python操作MongoDBpymongo

MongoDB简介(摘自:http://www.runoob.com/mongodb/mongodb-intro.html) MongoDB 由C++语言编写,是一个基于分布式文件存储的开源数据库系统。 MongoDB 将数据存储为一个文档,数据结构由键值对(key=>value)组成 ...

Thu Jan 10 01:12:00 CST 2019 0 911
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM