I have setup mongodb 64bits on Windows. I ran server and client successfully.
But when I type:
show dbs
Output is
local 0.000GB
Why ? show dbs is supposed to list all databases at least the default one "test" am I wrong ?
If you want to check your databases list, use the command show dbs. Your created database (mydb) is not present in list. To display database, you need to insert at least one document into it. In MongoDB default database is test.
In MongoDB, you don't need to create collection. MongoDB creates collection automatically, when you insert some document.
Although you may be in the test database by default, the database does not actually get created until you insert a document into a collection in the database which will implicitly create the collection and the database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With