Connect to a MongoDB database

Access a MongoDB database from your JetBrains IDE and do the work in the same window.

To connect to a MongoDB database, head over to the Database tool window on the right side of the IDE and click + (macOS) / New (Windows/Linux). Select Data Source then MongoDB as the data source type. Customize the name of the data source, connection details, then click on the Test link to ensure everything is ok.

Once everything is done, a Console tab will appear, and you can now query the database from the IDE. You can also explore it from the Database tool window, and select which parts to hide or show from it.

Note: You may need to download a database driver for the IDE first. If you see a Download driver link, you'll need to click on that before you can connect to the database.


Related Resources

Zero to Document Hero - Introduction to MongoDB
Zero to Document Hero - Introduction to MongoDB
Learn about the primary differences between relational databases, non-SQL databases and document databases.
Write SQL queries using popular database packages
Write SQL queries using popular database packages
Work with SQL queries and get completion and other features automatically.
Query a MongoDB databases
Query a MongoDB databases
Run any queries you want against the database inside your JetBrains IDE.