Mongo shell 给出错误“多次出现选项" [英] Mongo shell giving out the error "Multiple occurrences of option"

查看:78
本文介绍了Mongo shell 给出错误“多次出现选项"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下命令时

mongo --username admin_user --password passw#ord^s --authenticationDatabase admin

我收到错误"解析命令行时出错:多次出现选项--username".Mongo shell 3.0.12 版本.谁能告诉我这里出了什么问题?

I get the error ""Error parsing command line: Multiple occurrences of option "--username". The version of Mongo shell 3.0.12. Can anybody tell me what's wrong here?

推荐答案

好的.我设法找到了问题.出于某种原因,当前用户似乎没有正确使用 mongo shell 的权限.当我在开头添加sudo"时,它工作正常.

Ok. I managed to find the issue. The current user didn't seem to have permission to mongo shell properly for some reason. When I add "sudo" to the beginning it worked fine.

这篇关于Mongo shell 给出错误“多次出现选项"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆