How to list all databases in the mongo shell?

前端 未结 7 1776
灰色年华
灰色年华 2021-01-29 19:23

I know how to list all collections in a particular database, but how do I list all available databases in MongoDB shell?

7条回答
  •  终归单人心
    2021-01-29 20:04

    Listing all the databases in mongoDB console is using the command show dbs.

    For more information on this, refer the Mongo Shell Command Helpers that can be used in the mongo shell.

提交回复
热议问题