Quick Start
Get dbtrail streaming your MySQL changes — self-hosted with Docker Compose, or managed with dbtrail Cloud

dbtrail is an open-source (Apache-2.0) change-tracking and point-in-time recovery system for MySQL. It tails the binary log and keeps every row-level change — with full before/after images — in a searchable index, so you can query your entire history, generate precise undo SQL, and time-travel any row to any moment. Full base snapshots (mydumper) plus continuous binlog streaming give you recovery down to the individual row. It works with MySQL and Percona Server 8.0 and 8.4, including Amazon RDS, Aurora, and Google Cloud SQL.
You can run dbtrail yourself from the open-source repository, or let dbtrail Cloud run it for you — same engine, managed control plane.
dbtrail Cloud
Using the managed service? The signup, server-registration, and provisioning flow lives in the Cloud Quick Start. The prerequisites below apply to both editions.
Claude is the recommended interface
The fastest way to use dbtrail is to ask Claude — natural language, no query syntax to learn. The web console, CLI, and API (and the dashboard, on dbtrail Cloud) are fully featured and work without Claude; Claude is optional, not required.
Prerequisites
Before connecting a server, make sure your MySQL instance is ready:
| Requirement | SQL check | Expected value |
|---|---|---|
| MySQL 8.0 or 8.4 | SELECT VERSION(); | 8.0.x or 8.4.x |
| Binary logging enabled | SHOW VARIABLES LIKE 'log_bin'; | ON |
| Row-based replication | SHOW VARIABLES LIKE 'binlog_format'; | ROW |
| Full row images | SHOW VARIABLES LIKE 'binlog_row_image'; | FULL |
| InnoDB storage engine | See below | All tracked tables use InnoDB |
| Primary key on every table | See below | All tracked tables have a primary key |
Self-hosted dbtrail requires MySQL 8.0 or later; dbtrail Cloud additionally supports MySQL 5.7.
Run all three binlog checks at once
SHOW VARIABLES LIKE 'log_bin'; -- Must be ON
SHOW VARIABLES LIKE 'binlog_format'; -- Must be ROW
SHOW VARIABLES LIKE 'binlog_row_image'; -- Must be FULLbinlog_row_image must be FULL
This is the most commonly missed prerequisite. If binlog_row_image is set to MINIMAL or NOBLOB, dbtrail cannot capture complete before/after row data. Set it in your MySQL configuration:
[mysqld]
binlog_row_image = FULLSelf-hosted preflight: bintrail doctor
The bintrail doctor --source-dsn "user:pass@tcp(host:3306)/" command runs all of these checks and prints copy-pasteable remediation for anything that fails. The console's + Add server flow runs the same preflight automatically.
Create a dedicated MySQL user
Create a user with the minimum privileges dbtrail needs — replication access for binlog streaming and SELECT for schema snapshots:
CREATE USER 'bintrail'@'%' IDENTIFIED BY 'strong_password_here';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'bintrail'@'%';
GRANT SELECT ON *.* TO 'bintrail'@'%';On Amazon RDS and Aurora, grant the rds_replication role instead of REPLICATION SLAVE:
GRANT rds_replication TO 'bintrail'@'%';Use a strong, unique password
Replace strong_password_here with a strong password. If your MySQL server is not accessible from the public internet, you can restrict the host part (e.g., 'bintrail'@'10.0.%') instead of using '%'.
Choose your edition
Open Source
Self-hosted with Docker Compose. Apache-2.0, runs anywhere Docker does — streaming, query, undo SQL, time-travel, web console, and MCP included.
dbtrail Cloud
The managed option — hosted control plane, scheduled backups, team management, and a hosted MCP endpoint. Free plan available.
Open Source
Two commands stand up the full stack — the streaming daemon, a bundled index MySQL, and the web console:
curl -fsSLO https://raw.githubusercontent.com/dbtrail/dbtrail/main/docker-compose.yml
docker compose up -dOpen http://127.0.0.1:8090 — on first run the console asks you to create a username and password. Then click + Add server and paste the MySQL you want to watch (host, port, and the dedicated user you created above). dbtrail runs the preflight checks, provisions an index for the server, and starts streaming — you'll see events within the minute.
The compose stack bundles a MySQL 8.4 container as the index store; that index holds your forensic record, so back up its volumes. For binary installs, bringing your own index MySQL, baselines for time-travel, and production deployment, see the dbtrail repository.
dbtrail Cloud
dbtrail Cloud runs the same engine as a managed service: register your server and dbtrail provisions and operates the infrastructure — fully hosted, or with the agent inside your VPC so your data never leaves your network. Self-serve signup is closed; existing Cloud customers can follow the Cloud Quick Start.
Verify it works
Make a test change to confirm dbtrail is capturing events:
CREATE DATABASE IF NOT EXISTS dbtrail_test;
CREATE TABLE IF NOT EXISTS dbtrail_test.ping (
id INT PRIMARY KEY,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO dbtrail_test.ping (id) VALUES (1);Wait 30 seconds for the change to be indexed, then verify:
Open the console at http://127.0.0.1:8090 — the INSERT appears in the recent-changes list on the Overview, and the Events screen lets you filter by schema and table.
Running the binaries directly instead of the compose stack? The CLI does the same from the terminal:
bintrail query --index-dsn "$IDX" --schema dbtrail_test --table pingGo to Dashboard → Query, filter by schema and table, and you should see your INSERT events.

Or hit the REST API with an API key:
curl -s https://api.dbtrail.com/api/v1/query \
-H "Authorization: Bearer bt_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"server": "production-main", "schema": "dbtrail_test", "limit": 5}'Clean up the test table when you're done:
DROP DATABASE dbtrail_test;No changes appearing?
If nothing shows up after 60 seconds, check that the stream is running — the console's Status view (Open Source) or Dashboard → Servers → your server → Status (dbtrail Cloud) — and that the MySQL user has SELECT and REPLICATION privileges. See Troubleshooting for common issues.
Connect Claude
Both editions expose your change history to Claude (or any MCP client) through the same three read-only tools: query, recover (always dry-run — the AI never executes SQL), and status.
- Open Source — run the bundled
bintrail-mcpserver alongside your index, or self-host the MCP gateway for remote clients. - dbtrail Cloud — connect to the hosted endpoint
https://api.dbtrail.com/mcpwith abt_live_API key; included on all plans, including Free.
See Connect Claude for setup in Claude Code, claude.ai, Claude Desktop, and Cursor.
Once connected, ask Claude anything about your database changes:
"Show me recent changes in dbtrail_test"

Next steps
- Recovery guide — generate point-in-time recovery SQL from change history
- Point-in-time recovery — full base snapshots plus binlog replay
- Configure streams — schema and table filtering, checkpoint intervals, SSL
- ProxySQL time-travel SQL (Beta) — query historical row state from any MySQL client via
_flashback/_diff/_snapshotvirtual schemas - Connect Claude — MCP setup for every Claude surface
- Troubleshooting — common issues and fixes
- Cloud Quick Start — the managed-service path