> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/fabricate/project-and-database-management/data-agent-db-create-manage/database-add-connection.md).

# Adding a database connection to a project

{% hint style="info" %}
Database connections require an Enterprise license.

Your external database must allow connections from the [Fabricate IP addresses](/fabricate/about-fabricate/fabricate-ip-addresses.md).
{% endhint %}

## **Supported database platforms**

Database connections can connect to the following databases:

* Amazon Redshift
* Google BigQuery
* MySQL
* Oracle
* PostgreSQL
* Snowflake
* SQL Server

## **Defining a database connection**

To add a database connection to a project, in the navigation panel, click **Connect external database**.

<figure><img src="/files/WAYZyWbvOy2T3JkPbqSY" alt=""><figcaption><p>Option to connect to an external database</p></figcaption></figure>

### Selecting or creating the server connection

From the **Server** dropdown list, select the server connection option. You can add a new server connection, or select an existing workspace server connection.

<figure><img src="/files/RHf8ngNd8x4HXiHQU1Go" alt=""><figcaption><p>Server dropdown to select whether to create a new server connection</p></figcaption></figure>

The default option is **Enter connection details**. With this option, you provide the server connection information directly on the database connection panel. When you use this option to configure the server connection, the server connection is only used for the database connection. It is not added to the workspace list of server connections.

To create a new server connection that is added to the workspace list, select **Add a new workspace server**. Fabricate displays the **New Server Connection** panel to define the new workspace server connection.

For information about the configuration fields for server connections, go to [Configuring available server connections for a workspace](/fabricate/workspaces/workspace-server-connections.md).

To use an existing workspace server connection, select it from the list.

### Identifying the database

To identify the specific database to connect to on the server connection:

* For platforms other than Google BigQuery, in the **Database** field, provide the name of the database.
* For Google BigQuery, in the **Dataset** field, provide the name of the dataset to connect to.

### Providing a name to use to refer to the database connection

In the **Name in Fabricate** field, provide a name to use to refer to the database in the Data Agent chat.

### Testing and saving the connection

1. To test the connection to the database, click **Test Connection**.
2. To save the database connection, click **Connect database**.


---

# 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.tonic.ai/fabricate/project-and-database-management/data-agent-db-create-manage/database-add-connection.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.
