Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
66ebab8
feat(report): finalize HTML report, YAML output, and historical compa…
jmrenouard Jun 15, 2026
2a9b66e
chore: remove execution.log from git repository and sync docs
jmrenouard Jun 15, 2026
5f9cebb
feat(report): implement Phase 13 sectional global indicators and KPIs
jmrenouard Jun 15, 2026
c23198a
feat(report): add verbose timings, step percentages, and snapshot sum…
jmrenouard Jun 17, 2026
780c861
fix(main): calculate query cache efficiency using Com_select on Maria…
jmrenouard Jun 23, 2026
4575b0a
docs(metadata): remove timestamp from doc-sync generated files
jmrenouard Jun 23, 2026
a1be73c
feat(metadata): fix test badge and update version references in READMEs
jmrenouard Jun 23, 2026
64c28ce
fix(main): address PR #931 code review feedback and enhance test vali…
jmrenouard Jun 23, 2026
abe582a
docs: regenerate release notes
jmrenouard Jun 23, 2026
136a977
docs(roadmap): link strategic technical evolutions specification and …
jmrenouard Jun 23, 2026
0a87482
fix(main): add undefined/NULL guards to hr_num to resolve uninitializ…
jmrenouard Jun 24, 2026
a754147
docs: regenerate release notes
jmrenouard Jun 24, 2026
4cd208e
docs: update repository links to major/MySQLTuner-perl and add GitHub…
jmrenouard Jun 24, 2026
31e3638
docs: add LightPath as sponsor, relocate coffee button, and use star-…
jmrenouard Jun 24, 2026
da6d437
feat: recommend slow query log when disabled (#517)
jmrenouard Jun 24, 2026
0b5c859
docs: regenerate release notes
jmrenouard Jun 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ This directory contains the project's technical constitution, specialized skills


---
*Generated automatically by `/doc-sync` on 2026-06-12 20:03:20*
*Generated automatically by `/doc-sync`*
17 changes: 16 additions & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
npx --no-install commitlint --edit "$1"
#!/bin/sh

# Run commitlint first to validate the commit message format
npx --no-install commitlint --edit "$1" || exit 1

# Check if Changelog is staged when commit type is feat or fix
COMMIT_MSG_FILE="$1"
FIRST_LINE=$(head -n 1 "$COMMIT_MSG_FILE")

if echo "$FIRST_LINE" | grep -qE "^(feat|fix)(\([^)]+\))?!?:\s" ; then
if ! git diff --cached --name-only | grep -q "^Changelog$"; then
echo "ERROR: Commit type 'feat' or 'fix' detected, but 'Changelog' is not staged."
echo "Please update and stage 'Changelog' before committing."
exit 1
fi
fi
2 changes: 1 addition & 1 deletion CURRENT_VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.45
2.9.0
33 changes: 33 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# MySQLTuner Changelog

2.9.0 2026-06-15

- chore(main): whitelist deps and system commit scopes in check_compliance.pl to support Dependabot and host metrics commits.
- chore(main): add roadmap to the whitelist of allowed scopes in compliance checks.
- feat(cli): create an agent-ready output format (JSON/YAML) so that MySQLTuner can be easily integrated by AI agents.
- feat(report): add verbose execution timing measurements for each section, showing both elapsed time and its percentage relative to the total script execution time.
- feat(report): finalize a complete HTML report file beginning in v2.8.45.
- feat(report): move dump_csv_files execution step to immediately before make_recommendations.
- feat(report): print an environment audit snapshot summary (server, user, RAM, swap, versions, uptime) right after get_all_vars.
- feat(report): support historical comparison of database diagnostics and performance metrics over time.
- fix(cli): add mutually exclusive guard for json and yaml options.
- fix(main): calculate query cache efficiency using Com_select on MariaDB, where Com_select includes query cache hits (MDEV-4981).
- fix(main): calculate health score early in historical comparison to ensure scores exist for trend analysis.
- fix(main): format YAML null as tilde (~) and multiline values using literal block style.
- fix(main): guard InnoDB log file size and log size percentage checks against uninitialized variables.
- fix(main): guard version and version comment checks in MariaDB parallel replication and query cache blocks.
- fix(main): implement cached version comparison parser to eliminate uninitialized value warnings and improve performance.
- fix(main): add undefined and 'NULL' guards to hr_num to eliminate uninitialized value warnings.
- fix(main): sanitize and redact sensitive credentials from json/yaml output exports.
- fix(main): skip local /proc/loadavg read during remote database audits.
- fix(report): flush console output trace when opening raw log files late in dumpdir mode.
- fix(test): add undef fallbacks to human_size, hr_bytes and hr_bytes_rnd mocks in tests.
- test(lab): add unit tests for query cache efficiency logic on MySQL and MariaDB in tests/test_issue_927.t (renamed from tests/issue_927.t).
- test(lab): utilize isolated tempfile for mock json to avoid race conditions in tests/unit_phase13_kpis.t.
- test(report): add verbose timing and audit snapshot summary formatting checks to tests/verbose_timing.t.
- test(versions): add unit tests for version caching and comparisons, resolve redundant warnings, and use tempfile in tests/unit_versions.t.
- feat(main): recommend enabling slow query log if disabled (#517)
- test(lab): add unit test test_issue_517.t for slow query log recommendations (#517)
- test(lab): add unit test test_issue_480.t for table_open_cache_instances recommendation (#480)
- test(lab): split unit_coverage_boost4.t into smaller topic-oriented unit tests: unit_cli_helpers.t, unit_client_privileges.t, unit_cloud_commands.t, unit_fs_info.t, unit_os_vm.t
- test(lab): normalize all repro_issue_*.t and issue_*.t test file names to test_issue_*.t


2.8.45 2026-06-04

- chore: restore doc_sync.py utility script and run doc synchronization.
Expand Down
26 changes: 13 additions & 13 deletions POTENTIAL_ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,26 @@

This file records anomalies discovered during laboratory testing (Perl warnings, SQL errors, etc.).

## [2026-05-29 Audit] Status Refresh v2.8.44
## [2026-06-16 Audit] Status Refresh v2.9.0

### Unit Test Results

- **Status**: ✅ ALL PASS
- **Files**: 72 test files
- **Assertions**: 362 tests
- **Files**: 81 test files
- **Assertions**: 462 tests
- **Perl Syntax**: Clean (`perl -cw mysqltuner.pl` — no warnings)

### Test Coverage Analysis

| Metric | Value |
|:---|:---|
| Total Subroutines | 167 |
| Tested Subroutines | ~154 (~92%) |
| Untested Subroutines | ~13 (~8%) |
| Tested Subroutines | 167 (100%) |
| Untested Subroutines | 0 (0%) |

#### Remaining Untested Subroutines (System/IO-Heavy)

- `check_privileges`, `cloud_setup`, `get_fs_info`, `get_fs_info_win`
- `get_http_cli`, `get_os_release`, `get_tuning_info`
- `infoprintcmd`, `infoprinthcmd`, `is_virtual_machine`
- `parse_cli_args`, `show_help` (x2)
- None (100% subroutine coverage reached)

### 🔴 Critical Issues

Expand Down Expand Up @@ -58,7 +55,8 @@ This file records anomalies discovered during laboratory testing (Perl warnings,
#### PI-006: 13 out of 167 subroutines have zero test coverage
- **Impact**: Remaining untested functions are mostly system-level (filesystem, OS detection, cloud setup) or CLI helpers (`show_help`, `parse_cli_args`)
- **Severity**: 🟢 LOW — core diagnostic functions now fully covered
- **Coverage rate**: ~92% of subroutines referenced in at least one test (improved from ~55% → 62% → 78% → 92%)
- **Coverage rate**: 100% of subroutines referenced in at least one test (improved from ~55% → 62% → 78% → 92% → 100%)
- **Status**: [x] **FIXED** — All remaining subroutines covered in `tests/unit_coverage_boost4.t`.

#### PI-007: Extremely large subroutines
- **Impact**: Several functions exceed 500+ lines, making maintenance difficult
Expand All @@ -70,6 +68,7 @@ This file records anomalies discovered during laboratory testing (Perl warnings,
- **Source**: Each call to `mysql_version_ge()`, `mysql_version_le()`, `mysql_version_eq()` re-parses `$myvar{'version'}` via regex
- **Impact**: Redundant computation — called 100+ times across the script
- **Severity**: 🟢 LOW — performance impact minimal but code duplication
- **Status**: [x] **FIXED** — Implemented version parsing caching via `_parse_version()`.

#### PI-009: MariaDB 10.6 Approaching EOL
- **Source**: [mariadb_support.md](file:///mariadb_support.md)
Expand Down Expand Up @@ -114,12 +113,13 @@ This file records anomalies discovered during laboratory testing (Perl warnings,
- Binlog checksum, doublewrite consistency: NOT implemented
- **Status**: Phase 9 partially implemented

#### PI-016: ROADMAP Phases 10-12 — Not started
#### PI-016: ROADMAP Phases 11-12 — Not started
- Workload Analysis & Traffic Profiling: Not implemented
- Advanced Log Parser & Lock Monitoring: Not implemented
- Sectional Global Indicators: Not implemented

#### PI-017: ROADMAP Phase 13 (Export Optimization) — COMPLETED ✅
#### PI-017: ROADMAP Phase 13 (Sectional Global Indicators) — COMPLETED ✅

#### PI-018: ROADMAP Phase 14 (Export Optimization) — COMPLETED ✅

---

Expand Down
68 changes: 41 additions & 27 deletions README.fr.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
![MySQLTuner-perl](mtlogo2.png)

[!["Offrez-nous un café"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jmrenouard)
[![GitHub stars](https://img.shields.io/github/stars/major/MySQLTuner-perl?style=for-the-badge&logo=github)](https://github.com/major/MySQLTuner-perl)

[![État du projet](https://opensource.box.com/badges/active.svg)](https://opensource.box.com/badges)
[![État des tests](https://github.com/jmrenouard/MySQLTuner-perl/workflows/Test/badge.svg)](https://github.com/jmrenouard/MySQLTuner-perl/actions)
[![Temps moyen de résolution d'un problème](https://isitmaintained.com/badge/resolution/jmrenouard/MySQLTuner-perl.svg)](https://isitmaintained.com/project/jmrenouard/MySQLTuner-perl "Temps moyen de résolution d'un problème")
[![Pourcentage de problèmes ouverts](https://isitmaintained.com/badge/open/jmrenouard/MySQLTuner-perl.svg)](https://isitmaintained.com/project/jmrenouard/MySQLTuner-perl "Pourcentage de problèmes encore ouverts")
[![État des tests](https://github.com/major/MySQLTuner-perl/actions/workflows/pull_request.yml/badge.svg)](https://github.com/major/MySQLTuner-perl/actions)
[![Temps moyen de résolution d'un problème](https://isitmaintained.com/badge/resolution/major/MySQLTuner-perl.svg)](https://isitmaintained.com/project/major/MySQLTuner-perl "Temps moyen de résolution d'un problème")
[![Pourcentage de problèmes ouverts](https://isitmaintained.com/badge/open/major/MySQLTuner-perl.svg)](https://isitmaintained.com/project/major/MySQLTuner-perl "Pourcentage de problèmes encore ouverts")
[![Licence GPL](https://badges.frapsoft.com/os/gpl/gpl.png?v=103)](https://opensource.org/licenses/GPL-3.0/)

**MySQLTuner** est un script écrit en Perl qui vous permet d'examiner rapidement une installation MySQL et de faire des ajustements pour augmenter les performances et la stabilité. Les variables de configuration actuelles et les données d'état sont récupérées et présentées dans un bref format avec quelques suggestions de performances de base.
Expand All @@ -15,34 +15,48 @@
**MySQLTuner** est activement maintenu et prend en charge de nombreuses configurations telles que [Galera Cluster](https://galeracluster.com/), [TokuDB](https://www.percona.com/software/mysql-database/percona-tokudb), [Schéma de performance](https://github.com/mysql/mysql-sys), les métriques du système d'exploitation Linux, [InnoDB](https://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html), [MyISAM](https://dev.mysql.com/doc/refman/5.7/en/myisam-storage-engine.html), [Aria](https://mariadb.com/docs/server/server-usage/storage-engines/aria/aria-storage-engine), ...

Vous pouvez trouver plus de détails sur ces indicateurs ici :
[Description des indicateurs](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/INTERNALS.md).
[Description des indicateurs](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md).

![MysqlTuner](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/mysqltuner.png)
![MysqlTuner](https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.png)

Liens utiles
==

* **Développement actif :** [https://github.com/jmrenouard/MySQLTuner-perl](https://github.com/jmrenouard/MySQLTuner-perl)
* **Versions/Tags :** [https://github.com/jmrenouard/MySQLTuner-perl/tags](https://github.com/jmrenouard/MySQLTuner-perl/tags)
* **Changelog :** [https://github.com/jmrenouard/MySQLTuner-perl/blob/master/Changelog](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/Changelog)
* **Développement actif :** [https://github.com/major/MySQLTuner-perl](https://github.com/major/MySQLTuner-perl)
* **Versions/Tags :** [https://github.com/major/MySQLTuner-perl/tags](https://github.com/major/MySQLTuner-perl/tags)
* **Changelog :** [https://github.com/major/MySQLTuner-perl/blob/master/Changelog](https://github.com/major/MySQLTuner-perl/blob/master/Changelog)
* **Images Docker :** [https://hub.docker.com/repository/docker/jmrenouard/mysqltuner/tags](https://hub.docker.com/repository/docker/jmrenouard/mysqltuner/tags)

MySQLTuner a besoin de vous
===

**MySQLTuner** a besoin de contributeurs pour la documentation, le code et les commentaires :

* Veuillez nous rejoindre sur notre outil de suivi des problèmes sur [le suivi GitHub](https://github.com/jmrenouard/MySQLTuner-perl/issues).
* Le guide de contribution est disponible en suivant [le guide de contribution de MySQLTuner](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
* Mettez une étoile au **projet MySQLTuner** sur [le projet Git Hub de MySQLTuner](https://github.com/jmrenouard/MySQLTuner-perl/)
* Veuillez nous rejoindre sur notre outil de suivi des problèmes sur [le suivi GitHub](https://github.com/major/MySQLTuner-perl/issues).
* Le guide de contribution est disponible en suivant [le guide de contribution de MySQLTuner](https://github.com/major/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
* Mettez une étoile au **projet MySQLTuner** sur [le projet Git Hub de MySQLTuner](https://github.com/major/MySQLTuner-perl/)
* Support payant pour LightPath ici : [jmrenouard@lightpath.fr](jmrenouard@lightpath.fr)
* Support payant pour Releem disponible ici : [Application Releem](https://releem.com/)

### Sponsors

Le développement actif est sponsorisé par :

<p align="center">
<a href="https://www.lightpath.fr">
<img src="https://lightpath.fr/img/logo.png" alt="LightPath" width="200"/>
</a>
</p>

Merci à LightPath pour la mise à disposition des ressources (serveurs de développement, abonnement IA, environnements de recette & fonctionnalités).

![Statistiques GitHub de jmrenouard](https://github-readme-stats.vercel.app/api?username=jmrenouard&show_icons=true&theme=radical)

## Stargazers au fil du temps
[!["Offrez-nous un café"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jmrenouard)

## Historique des étoiles

[![Stargazers au fil du temps](https://starchart.cc/jmrenouard/MySQLTuner-perl.svg)](https://starchart.cc/jmrenouard/MySQLTuner-perl)
[![Star History Chart](https://api.star-history.com/svg?repos=major/MySQLTuner-perl&type=Date)](https://star-history.com/#major/MySQLTuner-perl&Date)

Compatibilité
====
Expand All @@ -58,8 +72,8 @@ Les résultats des tests sont disponibles ici uniquement pour les versions LTS 

Merci à [endoflife.date](https://endoflife.date/)

* Reportez-vous aux [versions prises en charge de MariaDB](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/mariadb_support.md).
* Reportez-vous aux [versions prises en charge de MySQL](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/mysql_support.md).
* Reportez-vous aux [versions prises en charge de MariaDB](https://github.com/major/MySQLTuner-perl/blob/master/mariadb_support.md).
* Reportez-vous aux [versions prises en charge de MySQL](https://github.com/major/MySQLTuner-perl/blob/master/mysql_support.md).

***La prise en charge de Windows est partielle***

Expand Down Expand Up @@ -156,12 +170,12 @@ Recommandations de sécurité

Salut l'utilisateur de directadmin !
Nous avons détecté que vous exécutez mysqltuner avec les informations d'identification de da_admin extraites de `/usr/local/directadmin/conf/my.cnf`, ce qui pourrait entraîner une découverte de mot de passe !
Lisez le lien pour plus de détails [Problème n°289](https://github.com/jmrenouard/MySQLTuner-perl/issues/289).
Lisez le lien pour plus de détails [Problème n°289](https://github.com/major/MySQLTuner-perl/issues/289).

Que vérifie exactement MySQLTuner ?
--

Toutes les vérifications effectuées par **MySQLTuner** sont documentées dans la documentation [MySQLTuner Internals](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/INTERNALS.md).
Toutes les vérifications effectuées par **MySQLTuner** sont documentées dans la documentation [MySQLTuner Internals](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md).

**MySQLTuner** analyse les domaines suivants :

Expand Down Expand Up @@ -190,14 +204,14 @@ Choisissez l'une de ces méthodes :

```bash
wget https://mysqltuner.pl/ -O mysqltuner.pl
wget https://raw.githubusercontent.com/jmrenouard/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
wget https://raw.githubusercontent.com/jmrenouard/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
```

2) Vous pouvez télécharger l'intégralité du référentiel en utilisant `git clone` ou `git clone --depth 1 -b master` suivi de l'URL de clonage ci-dessus.

```bash
git clone --depth 1 -b master https://github.com/jmrenouard/MySQLTuner-perl.git
git clone --depth 1 -b master https://github.com/major/MySQLTuner-perl.git
```

3) Sur Apple macOS, installez via [Homebrew](https://brew.sh/) :
Expand All @@ -217,8 +231,8 @@ docker run --rm -it jmrenouard/mysqltuner --host <database_host> --user <usernam

### Emplacement des versions (Releases)

* Les notes de version officielles et l'historique sont documentés dans le dossier [releases/](releases/) de ce dépôt (par exemple, [releases/v2.8.44.md](releases/v2.8.44.md)).
* Les tags de version Git et les archives sources téléchargeables sont disponibles sur [GitHub Releases](https://github.com/jmrenouard/MySQLTuner-perl/releases).
* Les notes de version officielles et l'historique sont documentés dans le dossier [releases/](releases/) de ce dépôt (par exemple, [releases/v2.9.0.md](releases/v2.9.0.md)).
* Les tags de version Git et les archives sources téléchargeables sont disponibles sur [GitHub Releases](https://github.com/major/MySQLTuner-perl/releases).

Installation facultative de Sysschema pour MySQL 5.6
--
Expand Down Expand Up @@ -473,7 +487,7 @@ export MYSQL_PASS=secret
perl mysqltuner.pl --userenv=MYSQL_USER --passenv=MYSQL_PASS
```

Pour une liste complète de toutes les options disponibles, exécutez `perl mysqltuner.pl --help` ou consultez la documentation [USAGE.md](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/USAGE.md).
Pour une liste complète de toutes les options disponibles, exécutez `perl mysqltuner.pl --help` ou consultez la documentation [USAGE.md](https://github.com/major/MySQLTuner-perl/blob/master/USAGE.md).

Prise en charge du cloud
--
Expand Down Expand Up @@ -666,15 +680,15 @@ Il n'existe actuellement **aucun dépôt APT/YUM/DNF officiel** qui suit la dern

```bash
wget https://mysqltuner.pl/ -O mysqltuner.pl
wget https://raw.githubusercontent.com/jmrenouard/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
wget https://raw.githubusercontent.com/jmrenouard/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
chmod +x mysqltuner.pl
```

* **Git clone :**

```bash
git clone --depth 1 -b master https://github.com/jmrenouard/MySQLTuner-perl.git
git clone --depth 1 -b master https://github.com/major/MySQLTuner-perl.git
cd MySQLTuner-perl
perl mysqltuner.pl
```
Expand Down
Loading