"MONGODB-CR credentials missing in the user document"的解决办法
来源:互联网 发布:手机电台录音软件 编辑:程序博客网 时间:2024/06/04 17:56
今天在本地开了mongoDB服务,用代码连接时用户名密码明明正确但是连不上,mongoDB的控制台显示“MONGODB-CR credentials missing in the user document”错误。在stackoverflow(原帖链接:https://stackoverflow.com/questions/29006887/mongodb-cr-authentication-failed)上找到了解决办法:
1)重启服务,不开启验证(参数中去掉–auth)
2)打开mongo控制台(windows下是bin\mongo.exe,mongod.exe是服务端)依次运行命令:
use adminvar schema = db.system.version.findOne({"_id" : "authSchema"})// 这里用schema.currentVersion可以看到值是5,表示使用SCRAM-SHA-1,3表示使用MongoDB-CRschema.currentVersion = 3db.system.version.save(schema)
3)重启服务,用mongochef删除之前的用户,重新建立一个就可以访问了。
阅读全文
0 0
- "MONGODB-CR credentials missing in the user document"的解决办法
- user is not in the sudoers file 的解决办法
- user is not in the sudoers 解决办法
- The GitHub credentials in the macOS keychain may be invalid.
- Security Tutorials系列文章第六章:Validating User Credentials Against the Membership User Store
- Becoming an WPA Xpert Part 12: Timing User Login Credentials (Sometimes it IS the user)
- Missing required Permissions manifest attribute in main jar的解决办法
- User Exits In Sales Document Processing
- User Exits In Sales Document Processing
- Missing dependencies in the kernel
- Windows Gather User Credentials (phishing)
- The document "(null)"requires Xcode 8.0问题的解决办法
- [lwn]Linux Credentials document, first draft
- the tables of the user in SAP
- Check the active user in the Application
- Host Credentials报错"Connection to host as user oracle failed: ERROR: Wrong password for user"的解决一例
- User Credentials CommandDialog with SecureString password
- VA01 SO 用户出口 User Exits In Sales Document Processing
- android如何丧心病狂的压缩
- Matlab简单教程:函数
- (*p)指针间接赋值
- Windows下配置SQLite
- u3d添加碰撞
- "MONGODB-CR credentials missing in the user document"的解决办法
- 网络编程
- Android获取app目录树结构工具类
- Matlab简单教程:绘图
- 前端框架对于未来web移动端的影响
- EXCEL表格复制到空白的EXCEL表格变形 解决方法
- java_多线程
- 文章标题
- 什么是全栈工程师