Navigation

Databases

Note

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

Databases Tab

The Databases tab lists the existing databases for your MongoDB deployment. To access the Databases tab, click the Home icon in the upper left corner and select the Databases tab.

../_images/database-tab.png

From this view, you can click a database name in the list 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.

Create a Database

1

Click the Create Database button.

From the Databases tab, click the Create Database button to bring up the Create Database dialog.

2

Enter database and first collection information.

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 newly created collection, select the Use Custom Collation checkbox and select the desired collation settings.

3

Click Create Database to create the database and its first collection.

Drop a Database

1

Click the trash can icon for the database.

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

2

Confirm the database to delete.

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

3

Click Drop Database to delete the database.

←   Compass Home Performance  →