# MariaDB Integration Reference Guide

{% hint style="info" %}
**Immuta policies will not be automatically enforced in MariaDB**

While you can author and apply subscription and data policies on MariaDB data sources within Immuta, these policies will not be enforced natively in the MariaDB platform. You can use [Immuta webhooks](https://documentation.immuta.com/saas/developer-guides/api-intro/immuta-v1-api/configure-your-instance-of-immuta/webhooks#webhook-overview) to be notified about changes to user access and make appropriate access updates in MariaDB using your own process.

To use this integration, contact your Immuta representative.
{% endhint %}

The MariaDB integration allows you to register data from MariaDB in Immuta. Immuta supports MariaDB on Amazon RDS.

## What does Immuta do in my environment?

### Registering a connection

MariaDB is configured and data is registered through [connections](https://documentation.immuta.com/saas/configuration/integrations/data-and-integrations/registering-a-connection/reference-guides/connections-overview), an Immuta feature that allows you to register your data objects through a single connection to make data registration more scalable for your organization. Instead of registering schema and databases individually, you can register them all at once and allow Immuta to monitor your data platform for changes so that data sources are added and removed automatically to reflect the state of data in your data platform.

When the [connection is registered](https://documentation.immuta.com/saas/configuration/integrations/mariadb/register-a-mariadb-connection), Immuta ingests and stores connection metadata in the Immuta metadata database. In the example below, the Immuta application administrator connects the database that contains `marketing-data`, `research-data`, and `cs-data` tables. Immuta registers[^1] these tables as data sources and stores the table metadata in the Immuta metadata database.

<figure><img src="https://1751699907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlWBda5Pt4s8apEhzXGl7%2Fuploads%2Fgit-blob-b5a5691181b134eb706472d3f039db3d84efa814%2FMariaDB%20connection%20-%20Register%20connection.png?alt=media" alt=""><figcaption></figcaption></figure>

Immuta presents a hierarchical view of your data that reflects the hierarchy of objects in MariaDB after registration is complete:

* Host
* Database
* Data object

Beyond making the registration of your data more intuitive, connections provides more control. Instead of performing operations on individual schemas or tables, you can perform operations (such as object sync) at the connection level.

See the [Connections reference guide](https://documentation.immuta.com/saas/configuration/integrations/data-and-integrations/registering-a-connection/reference-guides/connections-overview) for details about connections and how to manage them. To configure your MariaDB integration and register data, see the [Register a MariaDB connection guide](https://documentation.immuta.com/saas/configuration/integrations/mariadb/register-a-mariadb-connection).

### Required MariaDB privileges

The privileges that the MariaDB integration requires align to the least privilege security principle. The table below describes each privilege required by the [setup user](#user-content-fn-2)[^2] and the [`IMMUTA_SYSTEM_ACCOUNT`](#user-content-fn-3)[^3] user.

| MariaDB privilege                                          | User requiring the privilege | Explanation                                                                                                           |
| ---------------------------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Root user or `GRANT OPTION` privilege                      | Setup user                   | This privilege is required so that the setup user can grant privileges to the Immuta system account.                  |
| `SHOW DATABASES` on all databases in the server            | Immuta system account        | This privilege allows the Immuta system account to discover new databases to keep data in MariaDB and Immuta in sync. |
| `SHOW VIEW` on all views in the server                     | Immuta system account        | This privilege allows the Immuta system account to access view definitions.                                           |
| `SELECT` on all databases, tables, and views in the server | Immuta system account        | This privilege allows the Immuta system account to connect to MariaDB and register the databases and their objects.   |

### Maintaining state with MariaDB

The following user actions spur various processes in the MariaDB integration so that Immuta data remains synchronous with data in MariaDB:

* **Data source created or updated**: Immuta registers data source metadata and stores that metadata in the Immuta metadata database.
* **Data source deleted**: Immuta deletes the data source metadata from the metadata database and removes subscription policies from that table.

## Supported object types

| Object type | Subscription policy support | Data policy support | Request app support  |
| ----------- | --------------------------- | ------------------- | -------------------- |
| Base tables | :x:                         | :x:                 | :white\_check\_mark: |
| Views       | :x:                         | :x:                 | :white\_check\_mark: |

## Immuta policies

Immuta will not apply policies in this integration.

## Security and compliance

### Authentication methods

The MariaDB integration supports the following authentication methods to register a connection:

* **Access using AWS IAM role (recommended)**: Immuta will assume this IAM role from Immuta's AWS account to request [temporary credentials](#user-content-fn-4)[^4] that it can use to perform operations in the registered MariaDB database. This option allows you to provide Immuta with an IAM role from your AWS account that is granted a trust relationship with Immuta's IAM role.
* **Access using access key and secret access key**: These credentials are used by Immuta to register the connection and maintain state between Immuta and MariaDB. The access key ID and secret access key provided must be for an AWS account with the privileges listed in the [Register a MariaDB connection guide](https://documentation.immuta.com/saas/configuration/integrations/register-a-mariadb-connection#permissions).
* **Username and password:** These credentials are used by Immuta to register the connection and maintain state between Immuta and MariaDB. The credentials provided must be for a [MariaDB user account with the privileges listed in the Register a MariaDB connection guide](https://documentation.immuta.com/saas/configuration/integrations/register-a-mariadb-connection#permissions).

## Limitations and known issues

The following Immuta features are unsupported:

* Subscription and data policies
* Tag ingestion
* Query audit

[^1]: See the [Connections reference guide](https://documentation.immuta.com/saas/configuration/data-and-integrations/registering-a-connection/reference-guides/connections-overview#object-sync) for more details about how data objects are synced with Immuta so that the objects in PostgreSQL stay synchronous with the registered objects in Immuta.

[^2]: The MariaDB user registering the connection.

[^3]: This user account is used by Immuta to manage the integration once it has been set up.

[^4]: AWS rotates credentials every 15 minutes, so Immuta never stores these credentials. Immuta requests a new password every 15 minutes from AWS using this IAM role.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.immuta.com/saas/configuration/integrations/mariadb/mariadb-connection-reference-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
