log 日志错误信息

  1. 2018-10-24T16:14:42.244+0800 I NETWORK [initandlisten] connection accepted from 192.168.1.198:37354 #165 (2 connections now open)
  2. 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
  3. 2018-10-24T16:14:42.253+0800 I NETWORK [conn165] end connection 192.168.1.198:37354 (1 connection now open)
  4. 2018-10-24T16:14:42.756+0800 I NETWORK [initandlisten] connection accepted from 192.168.1.198:37356 #166 (2 connections now open)
  5. 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
  6. 2018-10-24T16:14:42.765+0800 I NETWORK [conn166] end connection 192.168.1.198:37356 (1 connection now open)
  7. 2018-10-24T16:14:43.268+0800 I NETWORK [initandlisten] connection accepted from 192.168.1.198:37358 #167 (2 connections now open)
  8. 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,命令行如下:

  1. > use admin
  2. switched to db admin
  3. > var schema = db.system.version.findOne({"_id" : "authSchema"})
  4. > schema.currentVersion = 3
  5. 3
  6. > db.system.version.save(schema)
  7. 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. lock wait timeout exceeded; try restarting transactio解决方案

    问题原因:       今天线上环境,突然出现一个问题,追踪原因是数据库中的一条语句报错,错误内容:lock wait timeout exceeded; try restarting transac ...

  2. POJ2502乘坐地铁上学

    POJ2502 题目大意:给你一个二维地图,起点终点,以及多条地铁线路(只有相邻两站才可互通)中的站点坐标.步行以及坐地铁的速度: 思路:难点在于建图,一个多小时磨磨蹭蹭,都是因为思路没捋清楚~~,对 ...

  3. Spring Boot 2 实践记录之 Redis 及 Session Redis 配置

    先说 Redis 的配置,在一些网上资料中,Spring Boot 的 Redis 除了添加依赖外,还要使用 XML 或 Java 配置文件做些配置,不过经过实践并不需要. 先在 pom 文件中添加 ...

  4. c#中在函数后紧跟=>,几个意思,差点懵逼到没有朋友!

    以下是一段新建.net core web中的代码: namespace TempCoreApp { public class Program { public static void Main(str ...

  5. 用.netcore写一个简单redis驱动,调试windows版本的redis.平且给set和get命令添加参数.

    1. 下载windows版本的redis 2.开发环境vs2017  新建一个 .net core控制台. private static Socket socket = new Socket(Addr ...

  6. C#Winfrom Listview数据导入Excel

    需引用 public void ExportToExecl() { System.Windows.Forms.SaveFileDialog sfd = new SaveFileDialog(); sf ...

  7. 徒手画个disk不容易啊。。。

    static const GLfloat disk_vertex_buffer_data[] = { // quarter 1 0.0f, 0.0f, -1.0f, 0.707f, 0.0f, -0. ...

  8. Backbone学习笔记 - Collection及Router篇

    Collection Collection可以看成是Model的集合.以下是一个集合的例子: var Song = Backbone.Model.extend({ defaults: { name: ...

  9. Python面向对象(类的成员之方法)

    day24 类的成员之方法 - 普通方法,保存在类中,由对象来调用,self > 对象 - 静态方法,保存在类中,由类直接调用 - 类方法,保存在类中,由类直接调用,cls > 当前类 c ...

  10. Ubuntu 16.04LTS安装Nginx

    Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器. Nginx 是由 Igor Sysoev ...