DEV Community

Last_Samurai 🇧🇼🇿🇦
Last_Samurai 🇧🇼🇿🇦

Posted on

1

How to Create a Database in MongoDB

Creating a MongoDB Database with the CLI (the MongoDB shell)

Open your terminal and type the following:

mongo

Thereafter,

show dbs

What will be retrieved is admin and local, also note that these two instances are part of every cluster.

Now let us create own! Take note that there is no create keyword. We are going to use 'use' instead.

use myAwesomeDB

We are done. Now you need to insert your schema and data for it to reflect.

Thanks for reading!

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series