# MySQL

## Overview

You can create a MySQL Destination Connector to write to a MySQL table using your MySQL username and password.&#x20;

The schema for this Destination Connector is defined by the MySQL table schema.

## Prerequisites

Required information:

* Host
* Port&#x20;
* Username
* Password
* Database
* Table

## Creating an MySQL **D**estination Connector

**Step 1:** After selecting **+ New Connector**, under the **System** prompt, click **MySQL.**

![](https://353417064-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYrsDW6vGBTygB1qqSE%2Fuploads%2FTqqS54tRKdPBON9i91KD%2FMySQL.png?alt=media\&token=10ea21f5-32d0-4d43-b775-d71c0c84b4e9)

**Step 2:** Provide a **Connector Name.**

**Step 3:** Select **Destination Connector.**

**Step 4:** Provide the **Host Name.**&#x20;

**Step 5:** Provide the **Port Number.**

**Step 6:** Provide your **Username.**

**Step 7:** Provide your **Password.**

**Step 8:** Provide the name of the **Database** that contains the table you want to write to.&#x20;

{% hint style="info" %}
If you are trying to access a database that is behind a firewall, please ensure that the following Osmos IP addresses are allowed to access the database. Osmos uses these fixed IP addresses to access your sources and destinations.&#x20;

* `35.222.106.198/32`
* `35.232.180.174/32`
  {% endhint %}

**Step 9:** Provide the name of the **Table** that you want to write to.&#x20;

{% hint style="info" %}
**Note:** the schema for this Destination Connector is defined by the MySQL table schema.
{% endhint %}

{% hint style="info" %}
**Note:** for any fields that have primary key, foreign key or other constraints, you may either (1) ensure that the source data mapped to the field satisfies those constraints or (2) leave the field empty and ensure that your database is set up to auto populate those fields with appropriate constraint-satisfying data.
{% endhint %}

## Advanced Options

#### Validation Webhook

We support the use of Validation Webhooks to prevent bad data from being written to your systems, adding another layer of protection to the built-in validations that Osmos provides. The Webhook URL can be posted here.

{% hint style="info" %}
For more information on Validation Webhook configuration, see [Server Side Validation Webhooks](https://docs.osmos.io/developer-docs/validation-and-transformation-webhooks)
{% endhint %}
