Mongo shell giving out the error “Multiple occurrences of option”

牧云@^-^@ 提交于 2021-01-28 02:27:23

问题


When using the following command

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

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?


回答1:


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.



来源:https://stackoverflow.com/questions/37874966/mongo-shell-giving-out-the-error-multiple-occurrences-of-option

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!