I have dropped a MongoDB database called 'test' but when I connect to mongod it shows it in the connection. Please see the code below. Can you please help me understand what is going on? Is this a bug or I am missing something? Why is it that test is not in the list of databases when using show dbs command. Thanks for the help.
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Me>c:\mongodb\bin\mongo
MongoDB shell version: 2.4.8
connecting to: test
db
test
show dbs
local 0.078125GB
>
Your
show dbs
output only has one db,local
, which is created automatically. If you don't specify a database on startup themongo
shell defaults totest
which is why you see "connecting to: test". The databasetest
will not be created until you start inserting data into a collection in it.