mongo port code example
Example 1: how to connect remote mongodb in cmd
mongo "mongodb://[email protected]:28015/?authSource=admin"
Example 2: how to know on which port my mongodb server is running
sudo lsof -iTCP -sTCP:LISTEN | grep mongo
mongo "mongodb://[email protected]:28015/?authSource=admin"
sudo lsof -iTCP -sTCP:LISTEN | grep mongo