--- title: "How to Connect a MySQL Database to Preset" slug: "mysql-connection" description: "Article about how to connect your MySQL database to Preset Cloud." updated: 2022-12-22T00:35:27Z published: 2022-12-22T00:35:27Z canonical: "docs.preset.io/mysql-connection" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.preset.io/llms.txt > Use this file to discover all available pages before exploring further. # MySQL ## Overview In this article we will explain how to connect a MySQL database to Preset. So let's get started! --- ## Allowlist Preset IPs Preset Cloud runs on four regions. For Preset to access your data, first thing you need to do is to add region based Preset IP addresses to your Inbound and Outbound firewall rules. | us-west-2 (us1a) | us-east-1 (us2a) | eu-north-1 (eu5a) | ap-northeast-1 (ap1a) | | --- | --- | --- | --- | | 35.161.45.11 | 44.193.153.196 | 13.48.95.3 | 35.74.159.67 | | 54.244.23.85 | 52.70.123.52 | 13.51.212.165 | 35.75.171.157 | | 52.32.136.34 | 54.83.88.93 | 16.170.49.24 | 52.193.196.211 | If you are not sure where your Preset workspace is located, you can refer to the URL on your browser when accessing Preset. It should look like this: https://xxxxxxxx.us2a.app.preset.io/superset..., where us2a means it is in us-east-1. --- ## Define the Host and Port Let's start by selecting **+ Database** — have a look at [Connecting your Data](/v1/docs/connecting-your-data) if you need help wth this step. ...then, in the *Connect a database* window, select the **MySQL** card. ![Select_MySQL](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Select_MySQL.png) In the **Host** field, enter the host for the database connection — this can be expressed as an IP address or as a domain. Next, in the **Port** field, enter the port number for the connection. If you do not have one, then use the default port number of **3306** for MySQL. ![MySQL_Host_and_Port](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/MySQL_Host_and_Port.png) --- ## Define Database Name and Credentials In the **Database Name** field, enter the exact name of the database that you are connecting to. In the **Username** and **Password** fields, enter the relevant credentials to connect to the database. ![Postgres_DB_Name_and_Credentials](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Postgres_DB_Name_and_Credentials.png) --- ## Define Display Name, Parameters, and SSL In the **Display Name** field, enter a database nickname for display in the Preset environment. In the **Additional Parameters** field, enter any additional custom parameters, as needed. Lastly, enable the **SSL** switch if you wish to require SSL mode for the connection. ![MySQL_Display_Name](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/MySQL_Display_Name.png) --- ## Make the Connection To finalize the connection, just select **Connect**. After your MySQL database is successfully connected to Preset, you will be provided with an opportunity to make any additional configurations to your database, if needed. To learn how to do this, please visit [Advanced Connection Settings](/v1/docs/advanced-connection-settings). When done, just select **Finish**. Great work! --- ## Reminder: Set up Firewall Rules Be sure to add Preset's IP addresses to your Inbound and Outbound firewall rules | Protocol | Port | Source | | --- | --- | --- | | TCP | 3306 | [Preset IPs](/v1/docs/connecting-your-data#introduction) |