Docs Menu

Docs HomeMongoDB Atlas

Connect with JDBC Driver

On this page

  • Prerequisites
  • Procedure

This page describes how to install and configure the MongoDB JDBC Driver for connecting to a federated database instance.

  • A federated database instance mapped to one or more data stores.

    Note

    If some or all of your data comes from an Atlas cluster, you must use MongoDB version 5.0 or greater for that cluster to take advantage of Atlas SQL.

  • An application or BI tool that you want to connect to your federated database instance with the JDBC driver.

  • The MongoDB JDBC Driver.

You can use the JDBC driver to connect to SQL-based Java applications that accept a JDBC API, such as a Maven project.

Download the latest MongoDB JDBC Driver version from the MongoDB download center if you haven't already.

1

To connect with your Maven application, copy the dependency snippet from the Maven Central Repository. Edit the version number in the dependency snippet to match your JDBC driver version. For example:

Image highlighting JDBC Driver Maven dependency
2
Image highlighting Maven dependency
←  Connect from the MongoDB ShellConnect to Atlas SQL with ODBC Driver →
Share Feedback