Docs Menu
Docs Home
/
MongoDB Compass
/

Databases

On this page

  • Databases Tab
  • Create a Database
  • Drop a Database
  • Limitations

A database is a container for collections. Each database gets its own set of files on the host file system. A single MongoDB server typically has multiple databases.

The Databases tab lists the existing databases for your MongoDB deployment. To access the Databases tab, click the deployment name in the Connections Sidebar.

Databases View
click to enlarge

From this view, you can click a database name in the sidebar to view its collections. Alternatively, you can view database collections by clicking the desired database in the left-hand navigation.

You can also create or drop databases from this view.

1

In the Connections Sidebar, click the icon to the right of the connection name to bring up the Create Database dialog.

2

In the dialog, enter the name of the database to create and its first collection. Both the database name and the collection name are required.

If you want to create a capped collection, select the Capped Collection checkbox and enter the maximum bytes.

If you want to use custom collation on the collection, select the Use Custom Collation checkbox and select the desired collation settings.

If your deployment is connected using In-Use Encryption, you can use Queryable Encryption on the newly created collection. Check the Queryable Encryption option and indicate the following encryption properties:

3
1

From the Databases tab, to delete a database, click on the trash can icon for that database. A confirmation dialog appears.

2

In the dialog, enter the name of the database to delete.

3
  • Creating and dropping databases is not permitted in MongoDB Compass Readonly Edition.

  • Creating databases is not permitted if you are connected to a Data Lake.

Back

Interact with Your Data