问题
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