How to connect to MongoDB in DBeaver

DBeaver PRO allows you to work with different types of databases, including NoSQL ones. Today, we want to guide you step-by-step through creating a connection to MongoDB, one of the most popular document-oriented databases.

1. Start by clicking on the New Database Connection button on the top toolbar to open the Connection Wizard. To find a MongoDB driver, just start entering its name in the search field or go to the NoSQL section of the wizard.

2. Double-click on the driver icon. A connection creation window will open, which includes several tabs. On the Main tab, you must fill in the host and port and choose the authentication method from the dropdown list. Depending on your chosen method, you may need to fill out a few more fields. For example, for SCRAM-SHA, you will need to enter the user and password.

3. If your database is accessible through an SSH tunnel, you must go to the SSH tab, check the box “Use SSH Tunnel”, and fill out the required fields.

To ensure that everything is entered correctly, click the Test tunnel configuration button. You will then see either a success message or an error message. In the case of an error message, you need to double-check the filled fields.

4. If your configuration requires using an SSL certificate, go to the SSL tab, check the Use SSL box, and upload the CA Certificate, Client Certificate, and Client Private Key files accordingly.

5. After completing all the settings, you can check if everything is correct by clicking the Test Connection button. If the connection can be established, you will see a window with the result and driver information.

6. Finally, the last step is to click the Finish button. The new connection will appear in the navigation tree. All you are left to do is click the Expand icon or select your database in the Database Navigator and click the Connect button on the top toolbar.

Author: