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
Did you know?
Account takeover often starts in the browser, on the login page itself. A malicious script can read credentials, tokens, or one-time codes as the person types them.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#