Skip to content
← All work
PlannedDatabase Management

DB Console: Control App for the MySQL Cluster

Planned: one screen for the three-server MySQL setup: who is primary, lag, ProxySQL routing, response tests, grant comparison between servers, and a full audit trail. Read-only unless explicitly switched on.

Status: planned. Design agreed, spec not written yet. Nothing on this page has been built.

A small control app for the three-server MySQL setup from the HA and ProxySQL/Orchestrator projects. It shows the topology and health in one place and runs routine admin actions safely, with a full audit trail. Read-only by default: changes stay off until an environment flag turns them on.

Tools (planned)

ToolWill be used for
FastAPI (Python)Backend API
React + shadcn/uiFrontend
MySQL performance_schema, SHOW REPLICA STATUSPrimary detection, QPS, lag, wait stats
ProxySQL admin interface (stats_*, query log)Routing state, per-backend connections, who ran what
Orchestrator APITopology and recovery history
docker-socket-proxyThe narrow Docker access needed for "create replica", nothing more

Planned features

1. Topology and health

What it will do: show which server is primary right now (polled read_only plus Orchestrator's view), each replica's lag, GTID state and thread status, and ProxySQL's hostgroups.

SELECT @@hostname, @@read_only, @@super_read_only, @@gtid_executed;
SHOW REPLICA STATUS;
-- ProxySQL admin:
SELECT hostgroup_id, hostname, status, ConnUsed, Queries FROM stats_mysql_connection_pool;

2. Response tests

What it will do: a one-click round-trip test through the writer and reader ports, measuring latency and confirming which server answered (@@server_id).

3. Admin actions, behind a flag

What it will do: create a replica (the scripted seed already used for replica 2), remove a database, and compare grants between servers. That last one would have prevented the five-app outage in the HA project. All of these stay disabled unless CONSOLE_MUTATIONS=1 is set.

4. Audit

What it will do: a single timeline combining three sources: the app's own action log, ProxySQL's query log, and MySQL-side history.

Open decisions

  • Scope: MySQL and ProxySQL only, or Postgres (the CDC target) too.
  • Login: reuse the Tailscale identity header like this site's admin panel, or add a real login.