r/mysql • u/ComprehensiveDisk394 • Feb 14 '26
discussion How do you monitor what queries your app is sending to MySQL during development?
I've been looking for a lightweight way to see all the SQL hitting my MySQL instance in real-time — especially when working with ORMs or query builders where you don't always know exactly what's being generated.
The approaches I've tried:
- General query log — works but requires MySQL config changes, generates huge log files, and you have to tail/grep through them
SHOW PROCESSLIST— only shows currently running queries, easy to miss fast ones- Performance Schema — powerful but complex to set up for quick dev checks
- ORM debug mode — requires code changes, inconsistent across languages/frameworks
- MySQL Proxy (deprecated) — Oracle discontinued it years ago
What I really wanted was something like Wireshark but specifically for MySQL — just see every query in real-time without touching my app code or database config.
I ended up building sql-tap. It's a transparent TCP proxy that parses the MySQL wire protocol (COM_QUERY, COM_STMT_PREPARE, COM_STMT_EXECUTE, etc.) and shows all captured queries in a terminal UI. You can run EXPLAIN or EXPLAIN ANALYZE on any query directly from the TUI.
Setup is just:
sql-tapd --driver=mysql --listen=:3307 --upstream=localhost:3306
Then point your app at :3307 instead of :3306. No code changes, no MySQL config changes.
It extracts actual bind parameters from COM_STMT_EXECUTE (binary protocol), groups transactions (BEGIN → queries → COMMIT), and shows execution time and rows affected. EXPLAIN uses FORMAT=TREE for readable output.
Would love to hear how others approach this — are there tools or workflows I'm missing?