charitha
charitha

Reputation: 361

Mongo shell giving out the error "Multiple occurrences of option"

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?

Upvotes: 3

Views: 2067

Answers (1)

charitha
charitha

Reputation: 361

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.

Upvotes: 1

Related Questions