log 日志错误信息

2018-10-24T16:14:42.244+0800 I NETWORK [initandlisten] connection accepted from 192.168.1.198:37354 #165 (2 connections now open)
2018-10-24T16:14:42.250+0800 I ACCESS [conn165] SCRAM-SHA-1 authentication failed for djx123 on djx_test from client 172.16.2.208 ; UserNotFound Could not find user djx123@djx_test
2018-10-24T16:14:42.253+0800 I NETWORK [conn165] end connection 192.168.1.198:37354 (1 connection now open)
2018-10-24T16:14:42.756+0800 I NETWORK [initandlisten] connection accepted from 192.168.1.198:37356 #166 (2 connections now open)
2018-10-24T16:14:42.762+0800 I ACCESS [conn166] SCRAM-SHA-1 authentication failed for djx123 on djx_test from client 172.16.2.208 ; UserNotFound Could not find user djx123@djx_test
2018-10-24T16:14:42.765+0800 I NETWORK [conn166] end connection 192.168.1.198:37356 (1 connection now open)
2018-10-24T16:14:43.268+0800 I NETWORK [initandlisten] connection accepted from 192.168.1.198:37358 #167 (2 connections now open)
2018-10-24T16:14:43.274+0800 I ACCESS [conn167] SCRAM-SHA-1 authentication failed for djx123 on djx_test from client 172.16.2.208 ; UserNotFound Could not find user djx123@djx_test

mongodb 加入了SCRAM-SHA-1校验方式,需要第三方工具配合进行验证,下面给出具体解决办法:

首先关闭认证(noauth = yes),修改system.version文档里面的authSchema版本为3,初始安装时候应该是5,命令行如下:

> use admin
switched to db admin
> var schema = db.system.version.findOne({"_id" : "authSchema"})
> schema.currentVersion = 3
3
> db.system.version.save(schema)
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })

更改后用之前的用户进行登录的话还是登录不了,因为之前之前的用户是基于之前的认证生成的,

我们将之前的用户删除,删除后重新创建用户

重新连接,成功。

可以查看一下链接介绍:

https://docs.mongodb.com/master/release-notes/3.0-scram/

还有国外友人的回答:

http://stackoverflow.com/questions/29006887/mongodb-cr-authentication-failed

本文转自https://www.cnblogs.com/timelesszhuang/p/5668589.html

mongodb 错误 SCRAM-SHA-1 authentication failed for --转的更多相关文章

  1. TortoiseGit:拉代码密码错误remote: Coding 提示: Authentication failed! 认证失败,请确认您输入了正确的账号密码

    问题 在控制面板里找到凭据管理器 修改密码之后拉取密码

  2. mongodb 使用mongodump备份 指定用户名密码 出现错误 Failed: error connecting to db server: server returned error on SASL authentication step: Authentication failed

    mongodb 使用mongodump备份 指定用户名密码 出现错误 [root@MongoDB ~]# mongodump --host -u admin -p -d db1 -o /root/ F ...

  3. pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法

    转自:http://blog.csdn.net/tingyuanss/article/details/43763899 用pgadmin3 新建服务器出现错误 Peer authentication ...

  4. 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法

    用pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 在stackoverflow上找到答案,出现此 ...

  5. (诊断)解决GitHub使用双因子身份认证“Two-Factor Athentication”后无法git push 代码的“fatal: Authentication failed for ...”错误

    在GitHub上采取双因子身份认证后,在git push 的时候将会要求填写用户的用户名和密码,用户名就是用户在GitHub上申请的用户名,但是密码不是普通登录GitHub的密码. 一旦采取双因子身份 ...

  6. UBUNTU下MONGODB出现PHP Fatal error: Uncaught exception 'MongoConnectionException' with message 和 Authentication failed on database 'admin' with username

    MONGO 远程连接服务器,出现: PHP Fatal error: Uncaught exception Stack trace:# /var/www/data/update_data.php(): ...

  7. MongoDB authentication failed

    0.随笔摘要: MongoDB  安装配置 MongoDB  权限控制 MongoDB  注意事项 authentication failed 1.MongoDB  下载安装配置 MongoDB官网  ...

  8. 用navicat进行身份验证连接出现cannot connect to Mongodb authentication failed

    用navicat进行身份验证连接出现cannot connect to Mongodb authentication failed. 解决办法: 1.打开mongoDB连接 win+r --cmd-- ...

  9. authentication failed for xxx错误

    现象: 公司windows定期修改过密码后 一直报错.push的时候显示“Authentication Failed for http://x.x.x.x/x/git” 猜想: 发现可能是账号问题. ...

随机推荐

  1. jmap的几个操作要慎用

    JDK中带有了一堆的工具是可以用来查看运行状况,排查问题的,但对于这些工具还是要比较清楚执行后会发生什么,否则有可能会因为执行了一个命令就导致严重故障,重点讲下影响比较大的jmap. 最主要的危险操作 ...

  2. hdu 5685 Problem A (逆元)

    题目 题意:H(s)=∏i≤len(s)i=1(Si−28) (mod 9973),求一个字符串 子串(a 位到 b 位的)的哈希值.这个公式便是求字符串哈希值的公式,(字符的哈希值 = 字符的ASC ...

  3. D3_book 11.1 pie

    <!-- pie example --> <!DOCTYPE html> <meta charset="utf-8"> <style> ...

  4. nodejs vinyl-fs 处理文件时输入问题

    使用 nodejs vinyl-fs 复制文件时输出路径不对,还是会有原来的相对路径,原因是用了反斜杠“\”,正斜杠“/”没问题 测试过程 node版本: v9.3.0 系统:win10 步骤: 得到 ...

  5. LOJ#3086. 「GXOI / GZOI2019」逼死强迫症(矩阵快速幂)

    题面 传送门 题解 先考虑全都放\(1\times 2\)的方块的方案,设防\(i\)列的方案数为\(g_i\),容易推出\(g_i=g_{i-1}+g_{i-2}\),边界条件为\(g_0=g_1= ...

  6. asp.net mvc 5 初体验

    参考:http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started 1. 新建 ASP.Net Web 应用程序,跟着向导一路 ...

  7. 五,session数据写入memcached

    1,session数据通常保存在服务器端的文件中,它的默认过期时间是1440s.我们可以将session数据保存到memcached中,设定memcached的过期时间大于session过期时间即可. ...

  8. 为 Apache 配置 UTF-8 中文编码

    为 Apache 配置 UTF-8 中文编码 cat /etc/httpd/conf/httpd.conf | grep -n utf -C2 30-# 31-ServerRoot "/et ...

  9. 转的很好的js 入门

    JavaScript概述 JavaScript的历史 1992年Nombas开发出C-minus-minus(C--)的嵌入式脚本语言(最初绑定在CEnvi软件中).后将其改名ScriptEase.( ...

  10. html基础+常用标签

    概述 HTML是英文Hyper Text Mark-up Language(超文本标记语言)的缩写,他是一种制作万维网页面标准语言(标记).相当于定义统一的一套规则,大家都来遵守他,这样就可以让浏览器 ...