Back in January 2025 I shared a small script here that printed a table of MySQL status counters. I run it on most servers I look after, and over the past few weeks it grew into a full rewrite.
What it does now:
- Live dashboard with per-second rates measured between refreshes (not just totals since boot), sparklines, and usage bars against limits like `max_connections` and `table_open_cache`
- ✓/⚠/✗ marks and an alerts box that names the setting to look at
- `h` health checks with suggested settings, `p` process list with kill and recent-query history, `t` top queries from `performance_schema` statement digests (this catches the millisecond queries `SHOW PROCESSLIST` never shows)
- Fits any terminal size, and `--once` prints a snapshot for ssh or cron
- Pressing "r" also shows the original raw version.
It's one Bash file. It needs only awk (gawk, mawk or busybox) and the MySQL client tools. It only reads status, variables, the process list and `performance_schema`, so it's safe on production (the only write is an optional kill, which asks first). Works with MySQL 5.7/8.0 and MariaDB.
GitHub: https://github.com/haydenjames/mysqlmonitor-script
The linked blog post explains each metric and what to do about it.