Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongo: show dbs doesn't show the test db. Why?

Tags:

mongodb

When I first type mongo, I see "connecting to : test". However, when I type show dbs, it does not show me the test db. I can still see local, as well as some other dbs that I created... but not test. Any hints why?

like image 444
Grateful Avatar asked Sep 22 '16 03:09

Grateful


1 Answers

If you type db you will see that you are on database named test, but it won't be shown in list, that happens because test db doesn't contain any document it is empty. You need to create at least one document in test database if you want it to be shown in list after typing show dbs

like image 51
kaxi1993 Avatar answered Nov 14 '22 05:11

kaxi1993