Show dbs command only shows local database, not only created ones

I started working with mongodb yesterday and am unable to create the database in the console. Every time i do

use exampledb
switched to db exampledb

      

but for some reason i am still only generating my locals ..?

show dbs
local  0.078GB

      

I created a / data / db folder in the root directory (after the tutorial) so I'm not sure what I am missing ... help rate!

+3


source to share


2 answers


You are missing nothing. exampledb

will only show (using show dbs

) when you insert at least one document into it. You can add collections manually if you want to use db.createCollection()

.



+6


source


Insert one document and show dbs "will display your database



-1


source







All Articles