Connect to a database running on a given host on a given port

mongo

  • MongoDB interactive shell client.
    More information: <https://docs.mongodb.com/manual/reference/program/mongo>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

mongo --host {{host}} --port {{port}} {{database}}

click the source code to copy install mongo on any operating system with command-not-found.com