1
0
mirror of synced 2025-12-25 02:09:19 -05:00

mysql destination docs (#3275)

* setup doc for mysql destination

* update the documentation in right places
This commit is contained in:
Subodh Kant Chaturvedi
2021-05-07 13:38:07 +05:30
committed by GitHub
parent 601ea5eed7
commit a2ec9ee1e5
4 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
# MySQL
## Overview
The Airbyte MySQL destination allows you to sync data to MySQL.
### Sync overview
#### Output schema
Each stream will be output into its own table in MySQL. Each table will contain 3 columns:
* `_airbyte_ab_id`: a uuid assigned by Airbyte to each event that is processed. The column type in MySQL is `VARCHAR(256)`.
* `_airbyte_emitted_at`: a timestamp representing when the event was pulled from the data source. The column type in MySQL is `TIMESTAMP(6)`.
* `_airbyte_data`: a json blob representing with the event data. The column type in MySQL is `JSON`.
#### Features
| Feature | Supported?\(Yes/No\) | Notes |
| :--- | :--- | :--- |
| Full Refresh Sync | Yes | |
| Incremental - Append Sync | Yes | |
| Namespaces | Yes | |
## Getting started
### Requirements
To use the MySQL destination, you'll need:
* A MySQL database version 5.7.8 or above
### Setup guide
#### Network Access
Make sure your MySQL database can be accessed by Airbyte. If your database is within a VPC, you may need to allow access from the IP you're using to expose Airbyte.
#### **Permissions**
You need a MySQL user with `CREATE, INSERT, SELECT, DROP` permissions. We highly recommend creating an Airbyte-specific user for this purpose.
#### Target Database
MySQL doesn't differentiate between a database and schema. A database is essentially a schema where all the tables live in. You will need to choose an existing database or create a new database. This will act as a default database/schema where the tables will be created if the source doesn't provide a namespace.
### Setup the MySQL destination in Airbyte
Before setting up MySQL destination in Airbyte, you need to set the [local_infile](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_local_infile)
system variable to true. You can do this by running the query `SET GLOBAL local_infile = true` with a user with [SYSTEM_VARIABLES_ADMIN](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_system-variables-admin) permission.
This is required cause Airbyte uses `LOAD DATA LOCAL INFILE` to load data into table.
You should now have all the requirements needed to configure MySQL as a destination in the UI. You'll need the following information to configure the MySQL destination:
* **Host**
* **Port**
* **Username**
* **Password**
* **Database**