> For the complete documentation index, see [llms.txt](https://docs.dinmo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dinmo.io/integrations/destination-platforms/mysql/synchronize-contact-attributes.md).

# Synchronize contact attributes

### Overview

This destination service allows DinMo to sync profile or segment attributes into an existing MySQL table.

To use this service, follow these three steps:

1. **Create a MySQL destination platform**. Follow the platform setup guide to establish the connection.
2. **Create your DinMo user segment or data model** representing the profiles you want to sync.
3. **Activate your segment or model** with the MySQL Contact Attributes destination service.

Every time the activation runs:

* DinMo writes mapped fields to the selected MySQL table.
* The first run processes the selected records.
* Later runs use DinMo delta detection to process changed records.
* The selected sync mode controls whether removed source records should also be removed from MySQL.

{% hint style="info" %}
The MySQL Contact Attributes destination is available as a beta destination service. If you do not see it in your workspace, contact your DinMo team.
{% endhint %}

### Destination Setup

Before beginning data synchronization, set up your MySQL destination service:

* Go to **Destinations** > **Add a new destination**.
* Choose your **MySQL** platform.
* Select **MySQL Contact Attributes**.
* Select the target **Table Name** from the available MySQL tables.
* Give the destination a name and save it.

DinMo lists the available tables from the connected MySQL database. The target table must already exist before you create the destination service.

### Activation Configuration

Once the destination is configured, create an activation to begin syncing your data:

* Select the DinMo model or segment you want to sync.
* Map DinMo fields to existing MySQL table columns.
* Make sure the field used to identify records is mapped to the corresponding MySQL column.
* Review the sync mode and schedule.
* Save and run the activation.

DinMo loads the available mapping fields from the columns of the selected MySQL table.

#### Sync mode

Sync modes determine how DinMo applies data changes to the destination.

For the MySQL Contact Attributes destination, the available options are:

<table data-full-width="true"><thead><tr><th>Sync Mode</th><th>Description</th><th>Use Case</th><th>Behavior</th></tr></thead><tbody><tr><td><strong>UPSERT</strong></td><td>Processes inserted and updated records using DinMo's delta detection logic.</td><td><ul><li>Keeping an application table updated with profile attributes.</li><li>Large datasets with limited day-to-day changes.</li><li>Destinations where deleted source records should remain in MySQL.</li></ul></td><td><ul><li>Creates missing destination rows when needed.</li><li>Updates existing destination rows when mapped values change.</li><li>Does not delete destination rows that disappear from the source selection.</li></ul></td></tr><tr><td><strong>MIRROR</strong></td><td>Keeps the MySQL table aligned with the current source selection, including removals.</td><td><ul><li>Maintaining a MySQL table as a replica of the current DinMo model or segment output.</li><li>Use cases that require records removed from the source to be removed from the destination.</li></ul></td><td><ul><li>Creates missing destination rows when needed.</li><li>Updates existing destination rows when mapped values change.</li><li>Deletes destination rows when the corresponding source record is no longer present.</li></ul></td></tr></tbody></table>

{% hint style="warning" %}
Mirror mode can delete rows from the selected MySQL table. Use it only when the table is dedicated to this activation or when deletions are expected.
{% endhint %}

#### Field Mapping

During activation setup, define how DinMo fields are written into MySQL:

* **Record identifier**: map the DinMo field used to identify records to the matching MySQL column.
* **Attribute fields**: map each DinMo field to the MySQL column you want to keep updated.
* **Column compatibility**: mapped values must be compatible with the destination column types.

{% hint style="warning" %}
DinMo does not create MySQL tables or alter MySQL schemas for this destination service. Create the table and columns in MySQL before configuring the destination.
{% endhint %}

#### Scheduling

Define how frequently DinMo updates MySQL.

Choose a schedule that matches the downstream freshness requirement. Operational applications usually require more frequent updates than internal reporting or back-office workflows.

### Common Use Cases

Teams typically use this destination service to:

* Sync profile attributes into an application database.
* Maintain customer attributes for internal tools or support workflows.
* Expose selected warehouse data to backend services.
* Keep a MySQL table aligned with a DinMo segment or model output.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.dinmo.io/integrations/destination-platforms/mysql/synchronize-contact-attributes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
