Connect to a database with a given username; user will be prompted for password

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 --username {{username}} {{database}} --password

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