I create a Database then refresh the connection and DB is gone

Bernard Quick shared this problem 5 years ago
Not a Problem

Replies (1)

photo
1

There is no CREATE DATABASE statement in MongoDB like there is in SQL. To create a database in MongoDB, simply switch to a non-existent database, then insert data into it. Start with MongoDB 3.0, If the database does not contain any collection, the database will be deleted.

In NoSQLBooster Creating an empty database node that is equivalent to a "use <db>" operation, and you need to add a collection to the database to actually create the database.

Leave a Comment
 
Attach a file