π§ A no-nonsense diagnostics tool for MySQL, MariaDB, and Percona Server.
blitz_diag runs a lightweight, comprehensive server check and stores the results in a single, easy-to-read table.
| Check | ID | Purpose |
|---|---|---|
| Replication Status | #00 | Flags replication status & lag |
| Query Cache | #01 | Detects whether query cache is enabled (should usually be off) |
| InnoDB Buffer Pool | #02 | Shows efficiency %, disk reads vs logical reads |
| Temp Tables | #03 | Flags high disk usage and gives action steps to fix |
| Missing Primary Keys | #04 | Finds tables without primary keys |
| MyISAM Tables | #05 | Identifies tables still using the legacy MyISAM engine |
| Foreign Key Mismatches | #06 | Detects mismatches in FK column types between referencing tables |
| Index-to-Data Ratio | #07 | Highlights potential index bloat or unnecessary indexes |
| Long-Running Queries | #08 | From performance_schema β slowest queries by total time |
| Root User Access | #09 | Flags insecure root@% users with empty passwords |
| Summary | β | Heuristics summary with emoji indicators (β
/ |
- Clone/download the repo
- Connect to your server using MySQL CLI or Adminer/phpMyAdmin/etc
- Run:
SOURCE blitz_base_diag.sql;
This will:
Create a schema: blitz_diag42
Create a procedure: blitz_diag()
Create a table: blitz_output
β Usage
To run the diagnostics:
CALL blitz_diag();
To view results:
SELECT * FROM blitz_diag42.blitz_output ORDER BY section_order;
π‘ Notes
Read-only: This script does **not** modify your data.
Designed for quick insights during audits or debugging.
Works on MySQL 5.7+, MariaDB 10.2+, and Percona.
π Coming Soon
Optional verbose/quiet modes
Scheduled reporting or webhook integrations
Web doc per check: blitz_diag.io#04 β explain "Missing Primary Key", etc.
π License
MIT β use, fork, enhance as you like. β¨ Maintained by
Built with β€οΈ by the community. Originally started by Kent Riboe β feel free to PR.