MySQL Connector¶
Strake supports querying MySQL and MariaDB transactional databases. It manages connection pooling asynchronously, optimizes SQL dialect translations, and pushes filters directly to the database.
1. Connection Syntax¶
The MySQL connection string is defined under the connection field of your SQL configuration. It supports standard MySQL URI formats:
Connection Example¶
2. Configuration Parameters¶
The MySQL database is configured as a sql source type with dialect: mysql:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
dialect |
string | Yes | - | Must be mysql. |
connection |
string | Yes | - | MySQL connection URI containing credentials. |
pool_size |
integer | No | 10 |
Maximum size of the asynchronous connection pool. |
3. Configuration Snippet¶
Add the following block to your sources.yaml to register a MySQL database: