DBTrail
Claude Integration

Using Claude with DBTrail

Query your MySQL change history using natural language

After Claude Setup, ask in plain words.

Ask in plain words and Claude picks the tool. Rows deleted from orders in the last 24 hours uses query. SQL to bring back order 1042 uses recover and returns a BEGIN/COMMIT script you review and run. What user 42 looked like yesterday at 3 PM uses reconstruct, from a backup plus the changes. Any ALTER on orders this week uses list_schema_changes.

You: Generate SQL to recover the deleted order 1042.

Claude: Here's the recovery SQL (dry-run). Review before executing:

BEGIN;
INSERT INTO `production`.`orders` (`order_id`, `customer`, `amount`, `status`)
VALUES (1042, 'acme-corp', 299.00, 'active');
COMMIT;

Always review recovery SQL

Claude generates the SQL and never executes it. A person reviews and runs it.

Better questions

  • Name the server when you have several.
  • Give a time range: "since the deploy at 2pm yesterday".
  • Name the event type and table: "only DELETEs in mydb.orders".
  • Ask for first or last: "the first DELETE after 14:00" returns oldest first without scanning everything.

Limits

  • Reads the index only: no SQL execution, no data changes, no starting or stopping streams.
  • No rate limits of its own.
  • Who made a change (MySQL user, host, program) is not answered; the index keeps each change's raw connection_id.

On this page