> ## Documentation Index
> Fetch the complete documentation index at: https://flextable-docs-oracle-client-choice.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to a database

> How to connect FlexTable to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, CockroachDB, Amazon Redshift, ClickHouse, SQLite, MongoDB, and Redis.

Every engine uses the same flow: **+ New Connection -> pick a type -> fill the form -> Test -> Save**, with fields that match that engine. New databases follow the same flow as they are added.

<img src="https://mintcdn.com/flextable-docs-oracle-client-choice/tHXEy7Wr6vLxVTOF/images/02-connecting/type-picker.png?fit=max&auto=format&n=tHXEy7Wr6vLxVTOF&q=85&s=5821f90312eba6bda861d0759452db0b" alt="Connection type picker" width="670" height="515" data-path="images/02-connecting/type-picker.png" />

<Tip>The **Test** button validates your credentials and reachability before you save. A green **Connected** badge means you are good to go.</Tip>

<Tabs>
  <Tab title="PostgreSQL">
    | Field           | Notes                                         |
    | --------------- | --------------------------------------------- |
    | Host / Port     | e.g. `localhost` / `5432`                     |
    | Database        | the default database to open                  |
    | User / Password | always required                               |
    | SSL             | see [Secure connections](/secure-connections) |

    <img src="https://mintcdn.com/flextable-docs-oracle-client-choice/tHXEy7Wr6vLxVTOF/images/02-connecting/postgres.png?fit=max&auto=format&n=tHXEy7Wr6vLxVTOF&q=85&s=d1b0ddd9b1b6bdd6d80025c9163ea668" alt="PostgreSQL form" width="671" height="513" data-path="images/02-connecting/postgres.png" />
  </Tab>

  <Tab title="MySQL / MariaDB">
    | Field           | Notes                               |
    | --------------- | ----------------------------------- |
    | Host / Port     | e.g. `localhost` / `3306`           |
    | Database        | optional, leave blank to browse all |
    | User / Password | required                            |

    <img src="https://mintcdn.com/flextable-docs-oracle-client-choice/tHXEy7Wr6vLxVTOF/images/02-connecting/mysql.png?fit=max&auto=format&n=tHXEy7Wr6vLxVTOF&q=85&s=13c6c48ac58038d3283e6af9b5f99d2e" alt="MySQL form" width="674" height="516" data-path="images/02-connecting/mysql.png" />
  </Tab>

  <Tab title="SQLite">
    SQLite is file-based, so there is no host, port, or credentials.

    <Steps>
      <Step title="Choose SQLite">Pick SQLite as the type.</Step>
      <Step title="Select the file">Click **Browse** and choose your `.db` or `.sqlite` file.</Step>
      <Step title="Save">The database opens in the sidebar.</Step>
    </Steps>

    <img src="https://mintcdn.com/flextable-docs-oracle-client-choice/tHXEy7Wr6vLxVTOF/images/02-connecting/sqlite.png?fit=max&auto=format&n=tHXEy7Wr6vLxVTOF&q=85&s=5a9286679e983ac18169a1e6b98d3225" alt="SQLite file picker" width="674" height="521" data-path="images/02-connecting/sqlite.png" />
  </Tab>

  <Tab title="MongoDB">
    | Field                 | Notes                                          |
    | --------------------- | ---------------------------------------------- |
    | Connection string     | `mongodb://...` or `mongodb+srv://...` (Atlas) |
    | Or host / port / auth | enter the components individually              |
    | Database              | optional                                       |

    <img src="https://mintcdn.com/flextable-docs-oracle-client-choice/tHXEy7Wr6vLxVTOF/images/02-connecting/mongodb.png?fit=max&auto=format&n=tHXEy7Wr6vLxVTOF&q=85&s=b6edd145618dc6a3fb7c3930623cb1fc" alt="MongoDB form" width="674" height="516" data-path="images/02-connecting/mongodb.png" />
  </Tab>

  <Tab title="Redis">
    Redis auth varies by version: no auth (local/dev), password only (Redis \< 6), or username + password (Redis 6+ ACL).

    | Field          | Notes                     |
    | -------------- | ------------------------- |
    | Host / Port    | e.g. `localhost` / `6379` |
    | Username       | optional (ACL)            |
    | Password       | optional                  |
    | Database index | `0`-`15`                  |

    <img src="https://mintcdn.com/flextable-docs-oracle-client-choice/tHXEy7Wr6vLxVTOF/images/02-connecting/redis.png?fit=max&auto=format&n=tHXEy7Wr6vLxVTOF&q=85&s=75e04cfd2e4a14bed8eaac8895dfe0b9" alt="Redis form" width="674" height="520" data-path="images/02-connecting/redis.png" />
  </Tab>

  <Tab title="SQL Server">
    | Field               | Notes                     |
    | ------------------- | ------------------------- |
    | Host / Port         | e.g. `localhost` / `1433` |
    | Database            | target database           |
    | Username / Password | SQL Server authentication |
  </Tab>

  <Tab title="Oracle">
    | Field               | Notes                     |
    | ------------------- | ------------------------- |
    | Host / Port         | e.g. `localhost` / `1521` |
    | Service name / SID  | your Oracle service       |
    | Username / Password | database credentials      |
  </Tab>

  <Tab title="CockroachDB">
    CockroachDB is PostgreSQL-wire compatible, so it connects like Postgres.

    | Field               | Notes                            |
    | ------------------- | -------------------------------- |
    | Host / Port         | e.g. `localhost` / `26257`       |
    | Database            | target database                  |
    | Username / Password | SQL user (TLS is often required) |
  </Tab>

  <Tab title="Amazon Redshift">
    Redshift speaks the PostgreSQL protocol.

    | Field               | Notes                          |
    | ------------------- | ------------------------------ |
    | Host / Port         | your cluster endpoint / `5439` |
    | Database            | target database                |
    | Username / Password | database credentials           |
  </Tab>

  <Tab title="ClickHouse">
    | Field               | Notes                                               |
    | ------------------- | --------------------------------------------------- |
    | Host / Port         | e.g. `localhost` / `8123` (HTTP) or `9000` (native) |
    | Database            | defaults to `default`                               |
    | Username / Password | e.g. `default` and your password                    |
  </Tab>
</Tabs>

## Next steps

<CardGroup cols={2}>
  <Card title="Secure connections" icon="lock" href="/secure-connections">SSL/TLS, SSH tunnel, and AWS RDS IAM auth.</Card>
  <Card title="Manage connections" icon="folder-tree" href="/managing-connections">Organize connections into folders and favorites.</Card>
</CardGroup>
