如何列出mongo shell中的所有数据库? [英] How to list all databases in the mongo shell?

查看:95
本文介绍了如何列出mongo shell中的所有数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何列出特定数据库中的所有集合,但是如何列出MongoDB Shell中的所有可用数据库?

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

推荐答案

使用命令show dbs在mongoDB控制台中列出所有数据库.

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

有关此信息,请参阅 Mongo Shell命令帮助程序在mongo shell中使用.

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

这篇关于如何列出mongo shell中的所有数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆