MySQL
Connect to any MySQL or MariaDB database.
Configuration
| Field | Required | Description |
|---|---|---|
host | Yes | Database host (e.g., localhost, db.example.com) |
port | Yes | Port number (default: 3306) |
database | Yes | Database name |
user | Yes | Database user |
password | Yes | Database password |
Query Mode
MySQL supports both Sync and Live mode. Choose during connection setup:
- Sync - Copies data to the Iceberg lakehouse. Fast local queries, historical data.
- Live - Queries your MySQL directly via DuckDB's
mysql_scanner. Always fresh, no sync delay.
See Live Mode for trade-offs and details.
Synced Tables
In sync mode, all tables in the selected database are discovered and synced with their original names. Incremental sync is supported for tables with an updated_at column.
Recommended Setup
sql
-- Create read-only userCREATE USER 'rawquery'@'%' IDENTIFIED BY 'secure_password';
-- Grant read accessGRANT SELECT ON mydb.* TO 'rawquery'@'%';
FLUSH PRIVILEGES;-- Create read-only userCREATE USER 'rawquery'@'%' IDENTIFIED BY 'secure_password';
-- Grant read accessGRANT SELECT ON mydb.* TO 'rawquery'@'%';
FLUSH PRIVILEGES;