# Create Redis data source for Azure Cache for Redis

Procedure: Enable the Database Tools and SQL plugin

This functionality relies on the  Database Tools and SQL plugin, which  is bundled and enabled in IntelliJ IDEA   by default. If the relevant features are not available, make sure that you did not disable the plugin.

> **Note:**
> Database Tools and SQL functionality support is limited in IntelliJ IDEA without the Ultimate subscription.

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.

2. Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.

Procedure: Official documentation

* For full information about Redis, refer to [the official documentation](https://redis.io/docs/).

* [Azure Cache for Redis Documentation at learn.microsoft.com.](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/)

* [Configure custom data access policies.](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-configure-role-based-access-control#permissions-for-your-data-access-policy)

In this tutorial, we will create a Redis data source, configure it to connect to a Redis database on Azure, and run a test connection to the database. For cache authentication, we will use a password-free authentication mechanism provided by the [Microsoft Entra](https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-whatis) integration.

## Prerequisites

* An [Azure Cache for Redis instance](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/quickstart-create-redis) in your Azure account. Note that it is recommended to enable the SSL connection in your Redis Cache settings. You can also specify the SSL port you want to use for your connection.

* [Microsoft Entra ID.](https://learn.microsoft.com/en-us/entra/fundamentals/whatis)

* [Microsoft Entra authentication enabled on your cache.](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-azure-active-directory-for-authentication#enable-microsoft-entra-authentication-on-your-cache)

Procedure: Connect to a Redis database on Azure

1. In the    Database   tool window   ,  click ![the New icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) New on the toolbar and navigate to  `Data Source | Redis`.

![Select the Redis data source](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create_new_data_source_redis.png)

2. Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the [JetBrains JDBC drivers](https://www.jetbrains.com.cn/en-us/datagrip/jdbc-drivers/) page.

![The Download missing driver files link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_download_missing_drivers_link.png)

3. Specify the database connection details.

1.

In the Host field, type the URL to connect to your Azure Cache for Redis instance with. For example, `my_redis_host_name.redis.cache.windows.net`.

2.

In the Port field, type the port number. In our case, it is `6380`.

3.

In the User field, type the Object ID of your managed identity or service principal.

4.

In the Password field, type  the Microsoft Entra token acquired by using the following command in the [Azure Command-line Interface (CLI)](https://learn.microsoft.com/en-us/cli/azure/what-is-azure-cli?view=azure-cli-latest): `az account get-access-token --scope https://redis.azure.com/.default` .

5.

In the Database field, type the database name to which you want to connect.  In our case, the database is the default `0` one.

Alternatively, type your JDBC URL in the URL field. The general URL to use is as follows:

* Format: `jdbc:redis://<host_address>:<port_number>/<database_name>`

* Example: `jdbc:redis://my_redis_host_name.redis.cache.windows.net:6380/0`

4. (Optional) On the SSH/SSL tab of  Data Sources and Drivers  dialog, select the Use SSL checkbox.

5. Click the Test Connection link at the bottom of the connection details area to initiate a test connection to your database.

![Test Connection link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_test_connection_link.png)

6. Click  OK to save your new data source.

* General tab ![Database connection details](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_details_redis_azure_cache_general.png)

* SSH/SSL tab ![Database connection details](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_connection_details_redis_azure_cache_ssh_ssl.png)

