Skip to content

Commit ffe9726

Browse files
authored
Fix MySQL docs review feedback in PR #217
1 parent fa14d0d commit ffe9726

2 files changed

Lines changed: 7 additions & 24 deletions

File tree

  • docs/content/drasi-server/how-to-guides/configuration
    • configure-bootstrap-providers/configure-mysql-bootstrap-provider
    • configure-sources/configure-mysql-source

docs/content/drasi-server/how-to-guides/configuration/configure-bootstrap-providers/configure-mysql-bootstrap-provider/_index.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The **MySQL bootstrap provider** loads initial state from a MySQL database so qu
2626

2727
- Use with a **MySQL source** (`sources[].kind: mysql`).
2828
- The database user must have **SELECT** permission on the configured tables.
29-
- The `tables` list is **required** — you must explicitly specify which tables to bootstrap.
29+
- Configure `tables` (and optional `tableKeys`) on the MySQL source.
3030

3131
## Quick example (Drasi Server config)
3232

@@ -54,32 +54,16 @@ sources:
5454
5555
## Configuration reference
5656
57+
`mysql` accepts **no additional fields**.
58+
5759
| Field | Type | Required | Description |
5860
|---|---|---:|---|
5961
| `kind` | string | Yes | Must be `mysql`. |
60-
| `host` | string | No | MySQL host (default: `localhost`). |
61-
| `port` | integer | No | MySQL port (default: `3306`). |
62-
| `database` | string | Yes | Database name to connect to. |
63-
| `user` | string | Yes | Database user with SELECT permission. |
64-
| `password` | string | No | Password (default: `""`). |
65-
| `tables` | string[] | Yes | Table allow-list for bootstrapping. Must contain at least one table. |
66-
| `tableKeys` | array | No | Override key columns per table (see below). |
67-
68-
### tableKeys
69-
70-
Use `tableKeys` to define key columns for element ID generation when primary keys are missing.
71-
72-
```yaml
73-
bootstrapProvider:
74-
kind: mysql
75-
tableKeys:
76-
- table: order_items
77-
keyColumns: [order_id, product_id]
78-
```
7962

8063
## Notes
8164

8265
- Drasi Server only allows `kind: mysql` when the source is also `kind: mysql`.
66+
- Connection and table scope come from the MySQL source configuration (for example `host`, `database`, `tables`, and `tableKeys`).
8367
- The `tables` list acts as a security allow-list — only tables explicitly listed will be bootstrapped.
8468
- Table names must use only letters, numbers, and underscores.
8569

docs/content/drasi-server/how-to-guides/configuration/configure-sources/configure-mysql-source/_index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The MySQL {{< term "Source" >}} streams row-level changes from a MySQL database
2626

2727
## Prerequisites
2828

29-
- MySQL **5.7+** or **8.0+**.
29+
- MySQL **8.0+**.
3030
- Binary logging enabled with row-based format:
3131
- `binlog_format = ROW`
3232
- `binlog_row_image = FULL`
@@ -129,7 +129,7 @@ If no key columns can be resolved for a row, the source logs a warning and falls
129129
| `serverId` | integer | auto-generated | MySQL server ID for the replication connection. Auto-generated from source instance ID if not specified. |
130130
| `heartbeatIntervalSeconds` | integer | `30` | Heartbeat interval in seconds for the replication connection. |
131131

132-
Fields marked with support Drasi Server config references like `${ENV_VAR}` / `${ENV_VAR:-default}`.
132+
Fields support Drasi Server config references like `${ENV_VAR}` / `${ENV_VAR:-default}`.
133133

134134
### tableKeys
135135

@@ -198,8 +198,7 @@ curl http://localhost:8080/api/v1/queries/my-query/results
198198
### 4. Check binlog status in MySQL
199199

200200
```sql
201-
SHOW BINARY LOG STATUS;
202-
SHOW REPLICAS;
201+
SHOW MASTER STATUS;
203202
```
204203

205204
## Troubleshooting

0 commit comments

Comments
 (0)