pymongo.errors.OperationFailure: Authentication failed., full error: {‘ok‘: 0.0, ‘errmsg‘: ‘Authenti
# mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]# 1、加上authSource参数即可,指明账户是在哪个数据库上创建的
client = pymongo.MongoClient('mongodb://username1:123456@168.2.2.2:27017/?authSource=xxx')"""-----------------或者--------------------------"""
# 2、指定了实际连接的数据库:db1,且没有设置 authSource,则authSource是实际连接的库db1。
#如果都没设置,则authSource是admin
client = pymongo.MongoClient('mongodb://username1:123456@168.2.2.2:27017/db1')
pymongo.errors.OperationFailure: Authentication failed., full error: {‘ok‘: 0.0, ‘errmsg‘: ‘Authenti相关推荐
- 使用pymongo连接mongodb时报错:pymongo.errors.OperationFailure: not authorized
连接本机或局域网部署的mongodb时可以用以下方法: 1 from urllib import parse 2 from pymongo import MongoClient 3 4 host = ...
- 解决scrapy爬虫报错 pymongo.errors.DuplicateKeyError: E11000 duplicate key error collection
scrapy爬虫报错内容 pymongo.errors.DuplicateKeyError: E11000 duplicate key error collection: scrapy_data.qi ...
- 执行truffle unbox react报错,出现Error: connect ECONNREFUSED 0.0.0.0:443问题的解决办法
前提:我是用的是MAC系统,不知道使用windows系统是否也可以 react-box 项目构建 localhost:ReactDapp liyuechun$ truffle unbox react- ...
- 已解决:Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed:
1.问题描述 在部署k8s时,有个步骤需要设置centos机器的时区,命令如下: timedatectl set-timezone Asia/Shanghai timedatectl set-loca ...
- 关于发邮件报错535 Error:authentication failed解决方法
关于发邮件报错535 Error:authentication failed解决方法 参考文章: (1)关于发邮件报错535 Error:authentication failed解决方法 (2)ht ...
- 535 5.7.8 Error: authentication failed: generic failure安装EMOS时SMTP测试报错
按照官方手册安装EMOS时候,进行到SMTP认证测试的时候报如下错: 535 5.7.8 Error: authentication failed: generic failure 原来是因为之前关闭 ...
- python 发送邮件535, 'Error: authentication failed' 解决
为什么80%的码农都做不了架构师?>>> 这是运行脚本报错信息 [root@iZ25av9xi4hZ ~]# python send_mail.py Traceback (mo ...
- “(535, b‘Error: authentication failed‘)“身份验证失败问题
语言:python 一.问题描述: 在使用python的smtplib模块测试自动发送邮件时,遇到(535, b'Error: authentication failed')报错.代码片段如下: de ...
- postgresql 开启远程访问、postgre设置开机自启动、psql: error: FATAL: Peer authentication failed for user “postgres“
文章目录 一.psql: error: FATAL: Peer authentication failed for user "postgres" 二.postgresql 开启远 ...
最新文章
- pku 1077 Eight
- 原创 | 这可能是比房子更保值的资产?七步法构建数据资产价值评估模型
- 开涛spring3(2.1) - IoC基础
- 读《白帽子讲Web安全》之安全意识篇(一)
- Pedestrian Identification (1) ——前景目标检测
- 软件测试技术——软件测试概述
- 求之不得的 Java 文档教程大汇总!
- html 图片自由缩放_PS中的“缩放”
- FA_手工明细增加固定资产(流程)
- Windows下多线程的使用
- Python爬虫入门并不难,甚至入门也很简单
- BS 和CS的区别
- Hadoop 2.6.0 FileSplit和InputSplit和FileInputFormat
- 浏览器-Charset:Chrome浏览器升级后右键工具中的编码修改功能没有了的解决工具
- mac打开.caj格式文件
- matlab 反走样,如何在python中使用Matlab的imresize
- 怎样设定绩效考核指标
- AI+安防,怎样引领安防行业的变革?
- linux 山东大学 试卷_绝密·启用前丨《2019年山东大学研究生高考试题》
- 《软件测试》第十章 外国语言测试