mdg0xg
Last Updated: February 25, 2016
·
1.872K
· suroorwijdan
F35807e1595582286e98122250113362

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

Say Thanks
Respond
Filed Under