← All Adapters
Official dbt MySQL adapter docs ↗
MYSQL
type: mysqlThe world's most popular open-source database. Widely used for operational/transactional workloads and web applications.
DVT SUPPORT
✓ FEDERATION SOURCE
read in federation models
✓ FEDERATION TARGET
materialize federation results
✓ DEFAULT TARGET
run full dbt projects against it
✓ SEED TARGET
dvt seed --target loads here
DVT supports MySQLbecause both dbt and Sling do: dbt drives standard materializations when it's your default target, Sling moves data in and out during federation. Connectivity for both layers is checked with dvt debug --all.
PREREQUISITES
Driver: mysqlclient — installed automatically by:
dvt sync
CONFIGURATION FIELDS
| FIELD | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| type | string | yes | — | Must be `mysql` |
| host | string | yes | localhost | Database server hostname |
| port | integer | no | 3306 | Database server port |
| user | string | yes | — | Database username |
| password | string | yes | — | Database password |
| database | string | yes | — | Database name (MySQL schema = database) |
| schema | string | no | — | Defaults to the database name |
| threads | integer | no | 4 | Number of parallel threads |
PROFILES.YML EXAMPLE
my_project:
target: mysql_dev
outputs:
mysql_dev:
type: mysql
host: localhost
port: 3306
user: analyst
password: "{{ env_var('MYSQL_PASSWORD') }}"
database: operations # MySQL schema = database
schema: operationsSOURCES.YML EXAMPLE
sources:
- name: crm
meta:
connection: mysql_dev
schema: crm_db
tables:
- name: customers
- name: orders
- name: productsDBT ADAPTER FEATURES
When MySQL is your default target, every standard dbt model runs through the official dbt adapter — all of its documented capabilities apply unchanged:
MATERIALIZATIONS
tableviewincrementalephemeralf_tablef_incrementalINCREMENTAL STRATEGIES
appenddelete+insertNOTABLE CONFIGS
- ▸engine selection (InnoDB)
FEDERATION INCREMENTAL STRATEGIES
Strategies available when this engine is the target of a f_incremental model:
✓ Append✓ Delete+Insert✓ Merge