show databases //Print a list of all available databases.
show dbs // Print a list of all databases on the server.
几个基本命令
use <db> // Switch current database to <db>. The mongo shell variable db is set to the current database.
show collections //Print a list of all collections for current database.
show users //Print a list of users for current database.
show roles //Print a list of all roles, both user-defined and built-in, for the current database.
5 回答
列出mongoDB控制台中的所有数据库都使用命令
show dbs
.有关此内容的更多信息,请参阅可在mongo shell中使用的Mongo Shell Command Helpers .
对于MongoDB shell 3.0.5版,在shell中插入以下命令:
或者:
你也可以试试这个
对于数据库列表---
对于表/收藏清单---
希望这可以帮助..
从命令行问题
它给出了输出
在shell上列出mongodb数据库
几个基本命令