> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plumi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Connectors Overview

> Connect Plumi to your databases and data warehouses

## Supported Databases

Plumi connects to all major databases and data warehouses:

<CardGroup cols={2}>
  <Card title="PostgreSQL" icon="database" href="/connectors/postgresql">
    Connect to PostgreSQL databases, including Amazon RDS, Azure Database, and Google Cloud SQL.
  </Card>

  <Card title="MySQL" icon="database" href="/connectors/mysql">
    Connect to MySQL and MariaDB databases, including managed cloud instances.
  </Card>

  <Card title="ClickHouse" icon="database" href="/connectors/clickhouse">
    Connect to ClickHouse for high-performance analytics on large datasets.
  </Card>

  <Card title="BigQuery" icon="cloud" href="/connectors/bigquery">
    Connect to Google BigQuery for serverless data warehouse analytics.
  </Card>

  <Card title="Snowflake" icon="snowflake" href="/connectors/snowflake">
    Connect to Snowflake for cloud data platform analytics.
  </Card>

  <Card title="MongoDB" icon="leaf" href="/connectors/mongodb">
    Connect to MongoDB for document database queries.
  </Card>
</CardGroup>

## Adding a Connection

1. Navigate to **Data Connectors** in the sidebar
2. Click **Add Connection**
3. Select your database type
4. Enter connection details
5. Test the connection
6. Save

## Connecting Local Databases

Have a database running on your local machine or private network? Use [ngrok](https://ngrok.com) to create a secure tunnel that Plumi can connect to.

<Steps>
  <Step title="Install ngrok">
    Download and install ngrok from [ngrok.com/download](https://ngrok.com/download)
  </Step>

  <Step title="Start the tunnel">
    Run ngrok to expose your local database port:

    ```bash theme={null}
    # For PostgreSQL (default port 5432)
    ngrok tcp 5432

    # For MySQL (default port 3306)
    ngrok tcp 3306

    # For MongoDB (default port 27017)
    ngrok tcp 27017
    ```
  </Step>

  <Step title="Copy the forwarding URL">
    ngrok will display a URL like:

    ```
    Forwarding  tcp://0.tcp.ngrok.io:12345 -> localhost:5432
    ```
  </Step>

  <Step title="Add the connection in Plumi">
    In **Data Connectors**, enter:

    * **Host**: `0.tcp.ngrok.io`
    * **Port**: `12345` (the port from ngrok)
    * **Database**: your database name
    * **Username/Password**: your database credentials
  </Step>
</Steps>

<Tip>
  This is the easiest way to connect local or private databases to Plumi without configuring firewalls or VPNs.
</Tip>

<Warning>
  Free ngrok URLs change each time you restart. For a persistent URL, consider [ngrok's paid plans](https://ngrok.com/pricing) or use a cloud-hosted database.
</Warning>

***

## Connection Security

<Info>
  Plumi uses encrypted connections (SSL/TLS) by default. Your credentials are stored securely and never exposed.
</Info>

### Best Practices

* **Use read-only credentials** when possible
* **Restrict IP access** to Plumi's servers
* **Rotate credentials** regularly
* **Use service accounts** instead of personal credentials

## Connection Pooling

Plumi manages connection pools automatically:

* Connections are reused efficiently
* Idle connections are closed after timeout
* Failed connections are retried automatically

## Troubleshooting

### Connection Refused

* Verify the host and port are correct
* Check firewall rules allow connections from Plumi
* Ensure the database server is running

### Authentication Failed

* Verify username and password
* Check the user has access to the specified database
* Ensure the user can connect from remote hosts

### SSL/TLS Errors

* Enable SSL on your database server
* Provide the correct CA certificate if required
* Check SSL mode settings
