Connect to MongoDB from command line

Connect to MongoDB from command line:

mongo --host mongodb://<HOST>:<PORT>/<DATABASE> -u <username> -p <password>

Connect to MongoDB from command line using authentication Database:

mongo --authenticationDatabase <authenticationDB> --host mongodb://<HOST>:<PORT>/<DATABASE> -u <username> -p <password>