# MariaDB

### Criar Ativo MariaDB no PAM

1. Navegue até **Console → Asset List**.
2. Clique em **"+ Create"** → Tipo: **Database** → Plataforma: **MariaDB**.
3. Preencha:

| Campo        | Valor                  | Observação               |
| ------------ | ---------------------- | ------------------------ |
| **Name**     | Ex: `MariaDB-Producao` | Nome identificador único |
| **Address**  | IP ou hostname         | Ex: `10.0.2.50`          |
| **Port**     | `3306`                 | Porta padrão             |
| **Database** | Nome do banco          | Ex: `app_db`             |

4. Adicione conta na aba **"Accounts"** com as credenciais.
5. Crie autorização em **Console → Permissions → Asset Permissions**.
6. Teste a conectividade.

### Métodos de Conexão

Idênticos ao MySQL:

* **Web GUI:** Editor SQL no navegador via Workbench
* **DB Client:** DBeaver via Magnus proxy
* **DB Connection Guide:** Informações para conexão manual (`mysql -h <host> -P <port> -u <user> -p`)
* **RemoteApp:** Navicat/DBeaver em sessão remota

### Troubleshooting MariaDB

| Problema                | Causa Provável                                | Solução                               |
| ----------------------- | --------------------------------------------- | ------------------------------------- |
| Erro "Access denied"    | Credenciais incorretas ou host não autorizado | Verificar GRANT no MariaDB            |
| Erro "Can't connect"    | Firewall bloqueando porta 3306                | Liberar porta entre PAM e MariaDB     |
| Erro "Host not allowed" | bind-address restritivo                       | Alterar `bind-address` para `0.0.0.0` |
| Timeout                 | Rede/firewall                                 | Verificar rota e regras de firewall   |
| Usuário não vê o ativo  | Falta autorização                             | Criar Asset Permission                |

> **💡 Nota:** A principal diferença entre MariaDB e MySQL no PAM é apenas a seleção da plataforma no momento de criar o ativo. O resto do fluxo (contas, permissões, conexão) é idêntico.


---

# 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://wiki.datadike.com/integracoes/databases/mariadb.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.
