• MongoVUE(1.6.9.0)登录提示:Connection was refused的解决办法


     日志文件上描述:

    UserNotFound Could not find user admin1@diva
    2015-10-13T12:12:22.208+0800 I NETWORK  [conn1] end connection 127.0.0.1:49323 (0 connections now open)
    2015-10-13T12:12:24.208+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:49325 #2 (1 connection now open)
    2015-10-13T12:12:24.209+0800 I ACCESS   [conn2]  authenticate db: diva { authenticate: 1, user: "admin", nonce: "xxx", key: "xxx" }
    2015-10-13T12:12:24.209+0800 I ACCESS   [conn2] Failed to authenticate admin1@diva with mechanism MONGODB-CR: AuthenticationFailed 


    解决办法:

    1、停止MongoDB的服务,将注册表中的配置认证(--auth)去掉;

    cmd中输入regedit,到注册表,找到以下路径:

    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMongoDB


    2、再次启动MongoDB的服务,打开CMD,输入mongo

    3、依次输入以下命令:

    var schema = db.system.version.findOne({"_id" : "authSchema"}) 
    schema.currentVersion = 3
    db.system.version.save(schema)



    然后得到:WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })

    4、删除原来的用户db.removeUser("admin")

    db.removeUser("admin")



    5、重新创建:

    db.createUser(  
        {  
            "user": "admin",  
            "pwd": "****",  
            "roles":[  
                {  
                    "role": "dbOwner",  
                    "db": "diva"  
                }  
            ]  
        }  
    )  

    并认证:

    db.auth('admin','****')



    好了后再回到MongoVUE就登陆成功了~太棒了,给自己点个赞大笑

  • 相关阅读:
    四、django rest_framework源码之频率控制剖析
    Ubuntu14.04配置记录
    尝试开始写博客
    用IDEA把SpringBoot项目打成jar发布项目
    IDEA创建springboot项目部署到远程Docker
    springboot 快速部署
    最详细的 Spring Boot 多模块开发与排坑指南
    SpringMVC的工作原理
    Dubbo最详解
    Zookeeper入门看这篇就够了
  • 原文地址:https://www.cnblogs.com/lykbk/p/yuoiuyyuiyiyui345345345345345345.html
Copyright © 2020-2023  润新知