Mongo/Databases
From charlesreid1
Getting Info About Databases
Mongo shell
Start the mongo shell:
$ mongo >
To list all available databases, use any of these commands:
> db.adminCommand('listDatabases')
> db.getMongo().getDBNames()
> show databases
> show dbs
Show all tables and collections in a database:
> use test_db > show tables > show collections > db.getCollectionNames()