# 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.**

![](/files/OmWC2iHfiobt2h20GH5b)

**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](/developer-docs/validation-and-transformation-webhooks.md)
{% endhint %}


---

# 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.osmos.io/destination-connectors/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.
