Created
February 19, 2016 16:14
-
-
Save mwmahlberg/dc128d557c0c3c13a0ec to your computer and use it in GitHub Desktop.
Script for connecting to mongod/mongos without the need to type in authInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USER="foo" | |
PASS="bar" | |
AUTHDB="someDb" | |
mongo $1 -u $USER -p $PASS --authenticationDatabase $AUTHDB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment