Connect to remote MongoDB with your CLI
This is a very basic tip, many times you would want to connect to your QA, PROD mongo instance from your terminal.
You can do so with the following command.
mongo MONGOSERVERURL:27017
If you have authentication enabled, which you might obviously have:
mongo -u <user> -p <pass> --host <host> --port 27017
Written by Suroor Wijdan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Cli
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#