Download the PHP package nathanpixodeo/mysql-tuner without Composer
On this page you can find all versions of the php package nathanpixodeo/mysql-tuner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download nathanpixodeo/mysql-tuner
More information about nathanpixodeo/mysql-tuner
Files in nathanpixodeo/mysql-tuner
Download nathanpixodeo/mysql-tuner
More information about nathanpixodeo/mysql-tuner
Files in nathanpixodeo/mysql-tuner
Vendor nathanpixodeo
Package mysql-tuner
Short Description MySQL / MariaDB performance analyzer and tuner – collects metrics and gives tuning recommendations
License MIT
Package mysql-tuner
Short Description MySQL / MariaDB performance analyzer and tuner – collects metrics and gives tuning recommendations
License MIT
Please rate this library. Is it a good library?
Informations about the package mysql-tuner
MySQL Tuner
A PHP-based MySQL / MariaDB performance analyzer that collects server metrics and provides actionable tuning recommendations. Think MySQLTuner-perl, but installable via Composer, fully featured, and production-ready.
Features
- Hit Rate Analysis — InnoDB buffer pool, MyISAM key buffer, thread cache hit rates
- Memory Tuning — Recommends
innodb_buffer_pool_size,max_connectionsbased on server RAM - Security Audit — Anonymous users, empty passwords, test database, wildcard hosts, root empty password
- Schema Analysis — MyISAM → InnoDB migration warnings, table fragmentation, total data size
- Replication Checks — Slave IO/SQL thread status, replication lag
- Version-Aware Rules — Separate rule sets for MySQL 8.x, default, security (extensible via JSON)
- Health Score — 0–100 weighted score based on severity of all findings
- Rich CLI — Color-coded output, exit codes (0=OK, 1=warnings, 2=critical), JSON mode
- Extensible — Add custom metrics, collectors, or rule files without modifying core code
Installation
Via Composer (recommended)
Manual (standalone)
Usage
Basic
Remote host
Unix socket
JSON output (for automation / monitoring)
No color (CI / logs)
Custom rules directory
Output
Console (default)
JSON
Exit Codes
| Code | Meaning |
|---|---|
| 0 | No issues |
| 1 | Warnings found |
| 2 | Critical issues found |
| 3 | Error (connection failed, etc.) |
Architecture
Writing Custom Rules
Rules are defined as JSON files in rules/. Each file contains groups, and each group contains an array of rule objects.
Rule Fields
| Field | Required | Description |
|---|---|---|
key |
Yes | MySQL variable/status name matching SHOW GLOBAL STATUS or SHOW GLOBAL VARIABLES |
type |
Yes | int, float, string, bool |
severity |
Yes | OK, INFO, WARNING, CRITICAL |
summary |
Yes | Human-readable message |
condition |
Yes | lt, gt, lte, gte, eq, neq, contains, not_contains, regex |
threshold |
Yes | The value to compare against |
suggestion |
No | Recommendation text |
Version Loading Priority
mysql-{major}.{minor}.json(e.g.mysql-8.0.json)mysql-default.jsonsecurity.json
Later files do not override earlier rules with the same key — first match wins.
Development
Requirements
- PHP 8.1+
ext-pdo+ext-pdo_mysqlext-json
CI
GitHub Actions runs on push/PR to main:
- PHP 8.1, 8.2, 8.3
composer validate --strict- PHP syntax check
- PHPUnit tests
- PHPStan analysis
Roadmap
- [ ] Percona Server / MariaDB 10.x/11.x specific rules
- [ ]
information_schemaindex analysis (duplicate/missing indexes) - [ ] Galera Cluster health checks
- [ ] Performance schema integration
- [ ] Prometheus/OpenMetrics exporter mode
License
MIT
All versions of mysql-tuner with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
ext-pdo Version *
ext-json Version *
ext-pdo Version *
ext-json Version *
The package nathanpixodeo/mysql-tuner contains the following files
Loading the files please wait ...