dbtrail
UnexploredMySQL change tracking with instant row-level recovery and forensic attribution for compliance.
Install
mcp_config.json
{
"mcpServers": {
"com-dbtrail-dbtrail": {
"url": "https://api.dbtrail.com/mcp",
"type": "streamable-http"
}
}
}Documentation
HTAP for MySQL and MariaDB. Transactions stay on your server; heavy queries come back in seconds from a columnar copy that follows your binlog, routed automatically on the same connection, with no ETL and nothing installed on your MySQL.
Website · Quick Start · Docs · Blog
mysql -h <dbtrail host> -P 3309 -u shop -p
SELECT c.tier, count(*) AS orders, round(sum(o.total), 2) AS revenue
FROM orders o JOIN customers c ON c.id = o.customer_id
GROUP BY c.tier ORDER BY revenue DESC;
The same SQL your application sends. DBTrail answered it from the copy, and your MySQL never ran it.
What you can do
- Run heavy queries in seconds. Totals and rankings over whole tables, trends over years of data, page 5,000 of a listing. In our test, the heaviest of 14 real reports took 225 seconds on a MySQL replica and 7.9 with DBTrail; the 14 ran 6.5 times faster on average. The numbers
- Keep one connection for your application. With routing on, DBTrail sends writes, transactions and lookups by key to your MySQL, and answers the heavy reads from the copy. Your application's SQL stays as it is. It also works behind ProxySQL. Connect your application
- Point dashboards at it. Metabase, Grafana or any tool that speaks MySQL. Dashboards
- Undo a wrong change. DBTrail keeps every change on your MySQL server, before and after, and writes the SQL that undoes the ones you didn't want. You review it and you run it. Undo a wrong change
- See a table as it was yesterday at 14:30, or every version of one row,
with
AS OFfrom your mysql client. To try it in 30 seconds with nothing of yours connected:docker run --rm -p 6033:6033 ghcr.io/dbtrail/bintrail-demo(the demo image). Restore tables to a moment - Ask Claude what changed. Connect Claude, or any MCP client, and ask in plain words: "what was deleted from orders in the last hour?", "how did customer 42 look on Monday?", "give me the SQL that puts it back". Its tools only read, and it never runs SQL on your MySQL. Connect Claude
Where it runs
DBTrail reads your binlog over the replication protocol, the way a replica does. Nothing is installed on your MySQL: no plugin, no agent, no triggers. You don't move to another database or another cloud. DBTrail runs on your own machines, next to MySQL, Percona Server, MariaDB, Amazon RDS or Aurora, and the copy is plain Parquet files on your disk or in your S3 bucket.
Install
You need Docker with Compose, and the mysql client.
curl -fsSL https://raw.githubusercontent.com/dbtrail/dbtrail/main/install.sh | sh
It starts DBTrail and opens http://127.0.0.1:8090. Connect your MySQL in the form, take the first copy, turn on the MySQL port, and run a heavy query: the five steps are in the Quick Start.
For a server you keep running, the same setup as a compose file and a few API calls you can keep in your automation: In production. Linux packages and Amazon ECS too.
Limits
- The copy is behind your MySQL. By seconds in fresh mode, the default, and by minutes in fast mode. A query that must see a write made a second ago belongs on your MySQL, and routing keeps transactions there.
- Lookups stay on your MySQL. A read by key takes a few milliseconds on MySQL and about 100 on the copy, so routing leaves it on your MySQL.
- Not high availability, and not your backup. Your data stays on your MySQL and nothing fails over to DBTrail. An application that connects to DBTrail's MySQL port depends on that port: while it is down the application gets connection errors there, with MySQL up and untouched. Keep a way to MySQL that does not pass through it, or a proxy in front that falls back to MySQL: When the router stops. History starts the day you install it. Keep your replicas and your backups.
- Needs a ROW binlog with full row images (
binlog_format=ROW,binlog_row_image=FULL), and a primary key on every InnoDB table. The connect form checks the binlog settings and shows the fix. - Some schema changes re-read a table. Adding or dropping a column, or a
TRUNCATE, makes DBTrail read that table again, with a short lock. - Row history needs a bucket to last. Without S3 it keeps 48 hours. The copy itself stays.
- The MySQL port's TLS is verifiable only with your certificate. Without
one, a client that asks for TLS gets it, with a certificate made up at
start that it cannot verify. Give the router yours (
--tls-cert,--tls-key) and clients can connect with--ssl-mode=VERIFY_IDENTITY. The port offers TLS and does not require it. See TLS on the port. - Yours to operate. DBTrail and its small index MySQL run on your machines. Disk, backups and upgrades are yours.
All of them: Limitations.
What it works with
| Source | Analytical copy | Row history and undo |
|---|---|---|
| MySQL 8.0, 8.4, 9.7 | Yes | Yes |
| Percona Server for MySQL 8.0, 8.4, 9.7 | Yes | Yes |
| Amazon RDS for MySQL | Yes (verified) | Yes (verified) |
| Amazon Aurora MySQL | Yes (verified) | Yes (verified) |
| Google Cloud SQL for MySQL | Should work, please report issues | Should work |
| MariaDB 10.11+, including Amazon RDS for MariaDB | Yes | Yes. See MariaDB source |
| PostgreSQL 15+ | Yes. Scheduled updates run, and a table added to the publication later is read in | Yes. See PostgreSQL source |
On PostgreSQL, DBTrail captures a table only at REPLICA IDENTITY FULL. On
PostgreSQL 18, a table with a VIRTUAL generated column cannot be at FULL,
so it cannot be captured, and a table with a STORED one needs
publish_generated_columns = stored on the publication to be. See
PostgreSQL source.
DBTrail never needs the binlog files on disk, which is why managed cloud databases work.
Each DBTrail installation serves one database family: MySQL and MariaDB, or PostgreSQL. See one database family per installation.
Who builds it
DBTrail is built by Daniel Guzman-Burgos, former MySQL Technical Lead at Percona.
Documentation
The guides live at dbtrail.com/docs. This repository keeps the reference for the command line and for operators:
Privacy
bintrail is DBTrail's command-line tool. It runs entirely in your
infrastructure. Your database data never leaves it: not your rows,
schemas, table names, queries, hostnames, DSNs, or file paths.
Official release builds do report metadata-only usage statistics: which command ran, whether it succeeded, a coarse error class, and your version and platform. It is on by default and turns off in one line:
bintrail telemetry off # or: DO_NOT_TRACK=1, BINTRAIL_TELEMETRY=off
bintrail telemetry show # prints what would be sent; sends nothing
No identifier of any kind is stored or transmitted, so nothing ties those statistics to you or your machine. A binary you build yourself has no reporting address compiled in and cannot send anything. TELEMETRY.md documents every field, every control, and the CI tests that enforce both.
The privacy policy covers the Claude Desktop extension (.mcpb),
which reports nothing at all, and how data moves when an AI client queries
your deployment.
License
Apache-2.0: free for any use, including commercial and production.
Contributions are welcome; see CONTRIBUTING.md. Each
commit carries a Signed-off-by line (DCO); git commit -s
adds it.
Want the index server operated for you (sized, backed up, upgraded, kept alive on-call) instead of running it yourself? That is the managed service at dbtrail.com. SUPPORT.md draws the ship-vs-operate line.
Sourced from the repository README.
More in Data & Databases
- Codebase Memory McpHigh-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.40,326
- PostgreSQL MCP ServerAllows AI assistants to inspect database schemas, run safe read queries, analyze indexes, and explain query performance on PostgreSQL.12,400
- SQLite MCP ServerQuery and inspect local SQLite database files with zero network overhead.6,500
- ArcadeDB MCP ServerBuilt-in MCP server for ArcadeDB multi-model database (graph, document, vector, time-series)1,099
- QueryWeaverAn MCP server for Text2SQL: transforms natural language into SQL using graph schema understanding.1,070
- postgresConnect to your PostgreSQL database to query data and schemas.62