> For the complete documentation index, see [llms.txt](https://docs.toucanai.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toucanai.cloud/build/data-connections/how-to/add-a-database.md).

# Add a database

{% hint style="info" %}
**Target Audience**: Non technical users
{% endhint %}

### Goal

Connect a PostgreSQL, MySQL, ClickHouse, Snowflake, Oracle, or Google BigQuery database/warehouse to Toucan.ai to enable metadata analysis and chart creation.

***

### Prerequisites

* A verified [Toucan.ai account](/getting-started/quick-start/subscribe-to-toucan.md).
* An active organization.
* Valid credentials/connection details depending on the selected connector:
  * PostgreSQL/MySQL: Host, Database Name, Username, Password, Port, and SSL settings.
  * ClickHouse: Host, Username, Password (optional), Port, and TLS setting.
  * Snowflake: Account, User, Private Key (PEM), Warehouse, Database, and optional Role/Schema/Passphrase.
  * Oracle: Host, Port, User, Password, and Service Name (plus a TLS wallet ZIP when your database requires TLS).
  * BigQuery: A Google service account credentials JSON file.
* Network access granted to Toucan.ai static IPs (see [Supported Databases](/build/data-connections/supported-databases.md)).

***

### Steps

#### 1. Navigate to the Database Section

* Click the **Database** tab from the Toucan.ai home page.
* View the list of currently connected databases.

#### 2. Initialize the Connection

* Click the **Add a database** button in the top-right corner.
* Select a connector from the available list (**PostgreSQL**, **Google BigQuery**, **MySQL**, **ClickHouse**, **Snowflake**, **Oracle**).

<figure><img src="/files/NEvqa3sCYjdpnkTAd5go" alt="Add a database"><figcaption></figcaption></figure>

#### 3. Input Connection Details

* Enter a **Name** to identify the connection internally.
* Then provide the details required by your connector:

**PostgreSQL**

* **Host** address (e.g., `database.mycompany.com`)
* **Port** (default: `5432`)
* **Database** name (e.g., `analytics`)
* **Username** and **Password**
* **SSL** toggle based on your security requirements

<figure><img src="/files/CNMMOvzRtAgOvQg4Pcw7" alt="Add a PostgreSQL database"><figcaption></figcaption></figure>

**BigQuery**

* Upload your Google service account credentials **JSON** file (credentials format depends on your service account)
* The form will load fields such as `project_id`, `client_email`, and the private key from the JSON

> If you need to review or edit values, you can open **View raw credentials** (collapsible section) inside the form.

**MySQL**

* **Host** address
* **Port** (default: `3306`)
* **User** and **Password**
* **Charset**
* **Database** name
* **SSL Mode**
* If **SSL Mode** is enabled, fill in **SSL CA**, **SSL Cert**, and **SSL Key**.

**ClickHouse**

* **Host** address (for example `hostname.clickhouse.cloud`)
* **Port** (default: `9000`)
* **User**
* **Password** (optional, depending on your ClickHouse setup)
* **TLS** toggle

**Snowflake**

* **Account** (for example `xy12345.us-east-1`)
* **User**
* **Warehouse** (for example `COMPUTE_WH`)
* **Database**
* **Schema** (optional)
* **Role** (optional)
* **Private key (PEM)**
* **Private key passphrase** (optional)

**Oracle**

* **Host** address (e.g. `db.example.com`, or your cloud provider’s hostname)
* **Port** (default `1521`; TLS setups often use a different port—use the value from your provider)
* **User**
* **Password**
* **Service name** (e.g. `ORCL` or the service name from your connection details)
* **TLS wallet (ZIP)** — only when your database requires TLS; upload the wallet archive as provided by your vendor (do not unzip it first)

{% hint style="info" %}
**Oracle TLS wallet**: For managed Oracle databases that require TLS, download the wallet from your provider’s console (e.g. Autonomous Database → **Database connection** → download wallet), then upload that ZIP in the form. Toucan.ai accepts ZIP files up to 500 KB with wallet files at the archive root or in a single folder. Not supported: pasting files individually, archives larger than 500 KB, deeply nested folder layouts, or relying on `tnsnames.ora` instead of filling **Host**, **Port**, and **Service name** in the form.
{% endhint %}

#### 4. Validate and Save

* Click **Test Connection** to verify that the credentials and network settings are valid.
* Wait for the success notification.
* Click **Connect** to save the configuration to your organization.

<figure><img src="/files/XedmV8OvbyEFHpqySdRB" alt="HR Database"><figcaption></figcaption></figure>

{% hint style="warning" %}
**Constraint**: If the test fails, verify that Toucan.ai IP(s) are allow-listed in your firewall. The UI will display an IP under **IP Whitelist**, and Toucan.ai also publishes the static IP `51.15.216.216` in its documentation.
{% endhint %}

***

### Conclusion

The database is now connected and visible in your organization's database list. You may proceed to analyze the data with AI to generate metadata descriptions.

**Suggested** **Next Steps**: [How-to: Analyse your database with AI](/build/analyze-your-database-with-ai/how-to/analyze-your-database-with-ai.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.toucanai.cloud/build/data-connections/how-to/add-a-database.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
