# Connect your SQL database to Geckoboard using Databases

Connect to your MySQL, MariaDB, PostgreSQL, Redshift, Snowflake, and MSSQL databases in seconds.

Updated over 3 weeks ago

Our Databases data source currently supports **MySQL**, **MariaDB**, **PostgreSQL**, **Amazon Redshift**, **Snowflake,** and **Microsoft SQL Server** databases.

# Database requirements checklist

Prepare your database for connecting to Geckoboard by running through each step below:

1. **Verify that your database is running correctly and is accessible online.** To do so, run the following command on a computer not logged into your VPN or private network. If the connection succeeds, your database will be accessible online. If it fails, it will not be.

1. Replace `your_db_host` and `your_db_port` with the host and port of your database:
      
      1. **Linux or OSX**: `nc -v your_db_host your_db_port`
      2. **Windows**: `telnet your_db_host your_db_port`

2. **Ensure your database accepts connections from these Geckoboard IP addresses:**
   
   1. `23.23.205.140`
   2. `50.16.244.16`
   3. `54.204.39.96`
   4. `54.243.225.101`
   5. `54.243.235.136`
   6. `54.243.235.173`

3. **Ensure that TLS encryption is enabled.** Connections between Geckoboard and your database will be encrypted, so TLS encryption must be enabled.
   
   1. For **MariaDB,** TLS is _disabled_ by default. Check if it's enabled by running the command `SHOW VARIABLES LIKE '%ssl%';`. [Learn more about how to enable TLS for MariaDB](https://www.osradar.com/configure-mariadb-with-ssl-to-secure-connections/).

4. **Ensure the user account being connected has read-only permissions.** Geckoboard only allows `SELECT` queries, however, for extra security, we only accept connections from users with read-only access to your database.

SSH tunnelling, also known as port forwarding is not a supported connection type for the Databases data source.

If your database doesn't allow TLS connections or is not accessible online, we recommend [these alternative methods](https://support.geckoboard.com/en/articles/6055592-more-ways-to-get-data-from-your-database).

# How to connect a database

To create a connection to your database, follow these steps:

1. On the **Connect to Database** panel, choose a Database type.
   
   1. For Supabase, select Postgres and use your [Session Pooler credentials](https://supabase.com/docs/guides/database/connecting-to-postgres).

2. Type in the **Connection name**. Give it a memorable name that helps you remember this connection.

3. Type in the **Host** (this could be your Public IP) and **Port**.
   
   1. By default, the port is set to 5432.
   2. The **Host** needs to be a publicly accessible address. We cannot connect to a database on localhost (`127.0.0.1`).

4. For **Snowflake** databases, enter your **Account** **URL** and **Warehouse**.

5. Type in the **Database name**.

6. Type in the database **Username** and **Password**.

7. Click **Connect** and your connection will be created.
   
   1. For Snowflake databases, **click Next**.
   2. Follow the steps on screen to setup and use [key-pair authentication](https://docs.snowflake.com/en/developer-guide/snowflake-rest-api/authentication#set-up-key-pair-authentication):
      
      1. Assign the public key with the command provided.
      2. Verify the connection.
