App connected to MongoDB database but database not visible with "show dbs" prompt in command line

Viewed 114

I have successfully connected my database called "Cats" using MongoDB, however, when I type "show dbs" in the command line I'm not able to see it. Do you know what step(s) I have missed and how I'm able to interact with this database from the command line?

This is all I see:

> show dbs
admin   0.000GB
config  0.000GB
local   0.000GB
1 Answers

To create db

use Cats

To check current database that you selected

db

show dbs doeosn't show until you insert at least one document into your Cats to display database.

db.animal.insert({"name":"dogs"})

Then type

show dbs 
Related