Connect to Your MongoDB Deployment
On this page
On this page, you'll learn how to connect to your MongoDB deployment using the MongoDB for IntelliJ Plugin.
Note
MongoDB Atlas
If you need to create a MongoDB host, consider using MongoDB Atlas. Atlas is a cloud-hosted database-as-a-service which requires no installation, offers a free tier to get started, and provides a copyable URI to easily connect the IntelliJ Plugin to your deployment.
Before You Begin
Ensure that an instance of MongoDB is running and the IntelliJ Plugin is installed.
Steps
Enter your connection string.
Paste your connection string directly in the URL field near the bottom of the Data Sources and Drivers tab.
Ensure that your connection string specifies the port that your instance is running on.
Click OK.
Select a data source using the Connections Toolbar.
The Connections Toolbar is a feature of the MongoDB for IntelliJ Plugin that allows you to select a data source associated with your application from within the editor window.
When you open a file that contains MongoDB code, a toolbar appears at the top of the file as shown in the following image.
This toolbar has a drop-down menu that allows you to select a data source associated with your application.
For the best experience, the data source you select should contain the following:
All of the databases, collection, and fields your application code uses.
All of the indexes used by your queries.