Enable transparent read/write splitting through MySQL Router for an InnoDB Cluster

domain: dev.mysql.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Bootstrap MySQL Router against the InnoDB Cluster so it auto-discovers topology from the cluster metadata
  2. Add a routing section (e.g. [routing:read_write_split]) with destinations using the PRIMARY_AND_SECONDARY role from the metadata cache
  3. Set access_mode=auto in that routing section so Router classifies each statement as read or write and targets the right member on a single shared port
  4. Set routing_strategy (e.g. round-robin) to load-balance reads across secondaries, and enable connection_sharing if desired for efficiency
  5. Point the application at the read/write-split port and confirm via Router logs/status that writes land on the primary and reads spread across secondaries

Known gotchas

Related routes

Configure ProxySQL query rules to split MySQL reads and writes across hostgroups
proxysql.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans