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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay