MYSQLTUNER(1)
π MYSQLTUNER(1) π
User Contributed Perl Documentation β yes bestie, it's mysqltuner, and it's about to become your entire personality π«Ά
πΈ NAME πΈ
MySQLTuner 2.9.2 β MySQL High Performance Tuning Advisor for MySQL, MariaDB, and Percona Server β¨
Like, it reads your database's aura and tells it what's wrong. No cap. π
β¨ SYNOPSIS β¨
mysqltuner [OPTIONS]
And here's all the ways you can run it, okay, pick your fighter π
# Basic local execution using standard unix socket
perl mysqltuner.pl
# Remote TCP/IP connection with explicit credentials and forced memory sizing
perl mysqltuner.pl --host 192.168.1.50 --port 3306 --user root --pass secret --forcemem 16G
# Containerized database analysis via Docker/Podman
perl mysqltuner.pl --container production_mysql_1 --user root --pass secret
# Generate comprehensive interactive HTML diagnostic dashboard
perl mysqltuner.pl --reportfile /var/www/html/tuner_report.html
# Export schema markdown documentation per database
perl mysqltuner.pl --schemadir /opt/db_docs/
# AI Agent integration output (actionable JSON remediation plan)
perl mysqltuner.pl --agent-json
π¨ IMPORTANT USAGE GUIDELINES π¨
Bestie. Read this part. I'm so serious. π
- Production Stability: Run the script without modifying arguments first to review recommendations before applying changes. Like, look before you leap, babe π
- Representative Workload: Let your database server run under normal production load for at least 24 to 48 hours before you trust any metric ratios or sizing advice. It needs time to cook π
- Privilege Requirements: You need administrative read-only access β that's
"SELECT","PROCESS","SHOW DATABASES","REPLICATION CLIENT"β for exhaustive diagnostics. No privileges, no tea β - Remote Host Hardware Sizing: When you're connecting over TCP/IP or SSH to remote instances, specify host RAM via
"--forcemem"(e.g."--forcemem 32G") so your buffer sizing recs are actually accurate. Don't skip this one π
π OPTIONS π
π Connection and Authentication Options
--host hostnameβ Connect to a remote MySQL/MariaDB server via TCP/IP hostname or IP address. Long-distance relationship, but make it networking π--port portβ TCP/IP port number to connect to (default:3306).--socket socket_pathβ Path to the local UNIX domain socket for database communication. The cozy local route π--user usernameβ Database username for authentication.--password password,--pass passwordβ Database password for authentication.--ask-passβ Prompt you interactively for the database password right there on the terminal.--defaults-file pathβ Path to a custom MySQL configuration file (e.g.,"~/.my.cnf").--defaults-extra-file pathβ Path to an additional configuration file, read after the standard defaults.--login-path pathβ Read credentials from a MySQL encrypted login path (via"mysql_config_editor"). Secrets but encrypted, we love to see it π--mysqlcmd pathβ Path to a custom"mysql"client binary.--mysqladmin pathβ Path to a custom"mysqladmin"binary.--tliβ Use the Transport Layer Interface abstraction.--ssl-ca pathβ Path to the SSL Certificate Authority (CA) certificate.--caching-sha2-passwordβ Forcecaching_sha2_passwordauthentication plugin mode.
βοΈ Target Environment and Cloud Discovery Options
--container container_name_or_idβ Run diagnostics inside a running Docker or Podman container. Container bestie rights π³--ssh-host hostnameβ Run diagnostics over SSH remote transport.--ssh-user usernameβ SSH login username.--ssh-key pathβ Path to your SSH private key file. Guard it with your life π--ssh-port portβ SSH daemon port (default:22).--aws-profile profileβ AWS CLI profile for Amazon RDS / Aurora cluster discovery.--aws-region regionβ AWS Region for RDS / Aurora discovery.--aws-cluster-identifier idβ Amazon RDS / Aurora cluster identifier.--aws-instance-identifier idβ Amazon RDS instance identifier.--gcp-project project_idβ Google Cloud project ID for Cloud SQL instances.--gcp-instance instance_idβ Google Cloud SQL instance identifier.--azure-resource-group groupβ Azure resource group for Azure Database for MySQL.--azure-server-name nameβ Azure MySQL flexible/single server name.
β‘ Performance and Diagnostic Tuning Options
--forcemem sizeβ Amount of physical RAM installed in the host (e.g.,"16G","1024M","128K").--forceswap sizeβ Amount of configured swap space on the host (e.g.,"4G","2048M").--skipworkloadβ Bypass high-cardinality table churn and auto-increment exhaustion checks.--skippasswordβ Skip the offline dictionary checks for weak user passwords.--skipsizeβ Skip table size enumeration queries on"information_schema". Queries are expensive, we're being polite πΈ--buffersβ Print detailed per-buffer memory allocations.--cvefile pathβ Path to a custom CVE vulnerabilities CSV database file.--passwordfile pathβ Path to a custom dictionary file for password audits.--checkversionβ Check for upstream MySQLTuner version updates. Are we out of date? Let's find out π--nondedicatedβ Adjust tuning formulas assuming the host runs non-database workloads too. Sharing is caring, but math must adapt π€--noprocessβ Skip OS-level non-mysqld process enumeration.
π€ Output and Export Options
--verbose,-vβ Activate full verbose output, including storage engines and table statistics. Give me everything π£οΈ--silentβ Suppress standard console output. Shhh π€«--outputfile pathβ Save the console report to a plain text file.--reportfile [path]β Generate an interactive, self-contained HTML diagnostic dashboard. Iconic behavior, honestly π--jsonβ Output raw diagnostic results as aJSONstring.--prettyjsonβ Output diagnostic results as formatted, indentedJSON.--agent-jsonβ Output an actionable AI remediation schema with SQL/config fixes and rollback statements. It's giving robot bestie π€--yamlβ Output diagnostic metrics inYAMLformat.--dumpdir pathβ Dump diagnostic data files and Markdown schema summaries to the target directory.--schemadir pathβ Export individual Markdown documentation files with Mermaid ER diagrams, per schema. Diagrams?? We're fancy now π--nocolorβ Disable ANSI color codes in terminal output. (Sad, but sometimes necessary for logs, ngl.)--noprettyiconβ Use plain text markers ([OK],[!!],[--]) instead of Unicode icons.--stage-timingsβ Display the execution duration for each analysis stage. Stopwatch era β±οΈ
π Debugging and Filtering Options
--debugβ Print internal debug traces and SQL query payloads.--dbgpattern regexβ Filter debug messages by regular expression pattern.--nobadβ Suppress negative findings and warning recommendations. Ignorance is bliss, I guess π--nogoodβ Suppress positive / passing health checks. Doom mode only π--noinfoβ Suppress informational messages.
π·οΈ VERSION π·οΈ
Version 2.9.2 β she's current, she's cute, she's stable β¨
π PERLDOC π
You can inspect the embedded manual with the perldoc command:
perldoc mysqltuner.pl
π§ INTERNALS
<https://github.com/jmrenouard/MySQLTuner-perl/blob/master/INTERNALS.md>
Internal documentation. For the girlies who want to know how the sausage is made π
π AUTHORS π
Major Hayden - major@mhtx.net Jean-Marie Renouard - jmrenouard@gmail.com
Legends, both of them. Bow down π«Ά
π CONTRIBUTORS π
The whole squad, no cap:
- Matthew Montgomery
- Paul Kehrer
- Dave Burgess
- Jonathan Hinds
- Mike Jackson
- Nils Breunese
- Shawn Ashlee
- Luuk Vosslamber
- Ville Skytta
- Trent Hornibrook
- Jason Gill
- Mark Imbriaco
- Greg Eden
- Aubin Galinotti
- Giovanni Bechis
- Bill Bradford
- Ryan Novosielski
- Michael Scheidell
- Blair Christensen
- Hans du Plooy
- Victor Trac
- Everett Barnes
- Tom Krouper
- Gary Barrueto
- Simon Greenaway
- Adam Stein
- Isart Montane
- Baptiste M.
- Cole Turner
- Daniel Lewart
- Jason Gill
- Jean-Marie Renouard
- Major Hayden
- Matthew Montgomery
- Stephan GroBberndt
- Christian Loos
- Long Radix
- derZ-dev
Every single one of y'all ate π
π SUPPORT π
Bug reports, feature requests, and downloads at <http://mysqltuner.pl/>
Bug tracker can be found at <https://github.com/jmrenouard/MySQLTuner-perl/issues>
Maintained by Jean-Marie Renouard (jmrenouard@gmail.com) β Licensed under GPL
π SOURCE CODE π
<https://github.com/jmrenouard/MySQLTuner-perl/>
git clone https://github.com/jmrenouard/MySQLTuner-perl/.git
Go on, clone it. You know you want to π
βοΈ COPYRIGHT AND LICENSE βοΈ
Copyright (C) 2006-2026 Major Hayden - major@mhtx.net # Copyright (C) 2015-2026 Jean-Marie Renouard - jmrenouard@gmail.com
For the latest updates, please visit <http://mysqltuner.pl/>
Git repository available at <https://github.com/jmrenouard/MySQLTuner-perl/>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Fr fr, read the license. It's free software, which is the best kind of software π
Okay that's the whole page, bestie!! π¦ Run it, love it, tune your database, and remember: this manual was delivered by perl v5.42.3 on 2026-08-20. Slay β¨ππ
π¦ where this page comes from
- ubuntu stonking: mysqltuner 2.9.2-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms