I arrived here with same question
.
It’s first time for me with Mongo, and I have the mental model from SQL.
My test case is a CMS (payload) that need a MongoDB instance in order to persist data.
Payload will create and fill “collections”. I do not even know collections names.
Typical connection string for payload are - in local env - mongodb://localhost:27017/payload-db
Here payload-db is the name of the database.
But when i launch a MongoDb instance locally, there is no “payload-db” database.
There are admin, config, local.
At this point, for me , the natural things to do is the mongo’s equivalent of SQL’s CREATE DATABASE payload-db