MongoDB assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }
2015-06-05 14:45
405 查看
assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }
MongoDB 2.4.10 使用admin数据库下的xucy管理员帐号导出数据,验证失败。
解决方法:
这个是2.2.2版本以后出现的,参考:https://jira.mongodb.org/browse/SERVER-9991
需要加入验证参数:
类似的命令有mongodump、mongorestore、mongoexport、mongoimport
本文出自 “SQL Server Deep Dives” 博客,请务必保留此出处http://ultrasql.blog.51cto.com/9591438/1658881
MongoDB 2.4.10 使用admin数据库下的xucy管理员帐号导出数据,验证失败。
# mongoexport -uxucy -p -d Test -c Pro -f _id,SK2,SK3 -o /data/var/log/mongodb/pro.json connected to: 127.0.0.1 Enter password: assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }
解决方法:
这个是2.2.2版本以后出现的,参考:https://jira.mongodb.org/browse/SERVER-9991
需要加入验证参数:
--authenticationDatabase admin
类似的命令有mongodump、mongorestore、mongoexport、mongoimport
# mongoexport --authenticationDatabase admin -uxucy -p -d Test -c Pro -f _id,SK2,SK3 -o /data/var/log/mongodb/pro.json connected to: 127.0.0.1 Enter password: exported 564097 records
本文出自 “SQL Server Deep Dives” 博客,请务必保留此出处http://ultrasql.blog.51cto.com/9591438/1658881
相关文章推荐
- 关于 wait_event_interruptible() 和 wake_up()的使用
- leetcode--Climbing Stairs
- 修复 FLASHMAIL 只能发不能收的问题
- JetBrain WebStorm 注册码
- 数据挖掘十大经典算法(9) 朴素贝叶斯分类器 Naive Bayes
- SVN show log failed
- 德州扑克AI简介——2015华为软件精英赛小结
- Contains Duplicate III
- 进程控制 [fork() exec() wait() waitpid()]
- 强人工智能基本问题:全局控制与自组织
- SharePoint 2013上传AI格式文件,再次下载后变成了PS格式文件
- leetcode_70题——Climbing Stairs(简单DP题)
- 11. Container With Most Water
- Naive Bayes在mapreduce上的实现
- leetcode 217: Contains Duplicate
- 正确使用Block避免Cycle Retain和Crash
- LeetCode "Contains Duplicate III"
- sgu252:Railway Communication(费用流)
- Climbing Stairs
- 从main函数中argc和argv开始学习