# MySQL

This page covers the details about integrating MySQL Database as Warehouse with Sprinkle.

When setting up MySQL as Data Warehouse, Sprinkle additionally requires a Cloud bucket.  This guide covers the role of all the components and steps to set up.

## Step by Step Guide

### Integrating MySQL

#### **STEP-1: Allow MySQL to accept connection from Sprinkle**

* If MySQL server is on **public network**, accessible over public IP, allow inbound connection on mysql port (default is 3306) from Sprinkle IPs (34.93.254.126, 34.93.106.136)
* If MySQL server is on **private network**, configure [SSH Tunnel](broken://pages/emsGh7pfcX6KOFoXondI) in Advanced Settings.

#### STEP-2: Configure MySQL Connection

* Log into the Sprinkle application
* Navigate to Admin -> Warehouse -> New Warehouse Connection
* Select MySQL
* Provide all the mandatory details
  * *Distinct Name\**: Name to identify this connection
  * Host : Provide IP address or Host name.
  * Port :Provide the Port number.
  * Database : Provide database name if there is any, it should be an existing database.
  * *Username*: MySQL account user name
  * *Password*: MySQL account password
* *SSH Tunnel in MySQL:*
  * Connect via SSH Host: Click on "Yes" to configure SSH Tunnel.
  * SSH Host\* : IP address or hostname of the SSH server
  * SSH Public Key\* : Copy the SSH public key and paste it into the \~/.ssh/authorized\_keys file of the SSH user on the ssh host machine
  * SSH Login Username\* : Provide the SSH Login Username where you added the public key. Further, verify the provided details by testing the connection.
  * *Networking rules from your end:*

    * Make sure SSH Host has public IP
    * Whitelist Sprinkle IPs (34.93.254.126, 34.93.106.136) in your SSH Host. SSH host should be able to accept traffic from these Sprinkle IPs.
    * Make sure SSH port 22 is open.

    Once this setting is completed you can try test-connection and if successful, you can update the changes.
* Test Connection&#x20;
* Create

### Create a Cloud Bucket

Sprinkle stores all intermediate data and report caches in the cloud bucket. Sprinkle supports creating a bucket in AWS, GCP, or Azure. Refer to respective documents for creating a configuring the Cloud Bucket.

* [Create S3 Bucket](/product/integrating-your-data/destination-warehouses/aws-redshift.md#step-1-create-a-s3-bucket)
* [Create Google Cloud Bucket](/product/integrating-your-data/destination-warehouses/google-bigquery.md#create-cloud-bucket)
* [Create Azure Storage Container](/product/integrating-your-data/destination-warehouses/azure-synapse.md#create-azure-storage-container)


---

# Agent Instructions: 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:

```
GET https://docs.sprinkledata.com/product/integrating-your-data/destination-warehouses/mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
