Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 770
charitha Avatar asked Jan 17 '26 13:01

charitha


1 Answers

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.

like image 130
charitha Avatar answered Jan 20 '26 06:01

charitha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!