cli-execution-mastery
What it does
This skill explains how to run the MySQLTuner check tool against different database setups. It is for database admins who want the check to connect securely.
When to use it
- ✓When you need to run MySQLTuner against a local, remote or containerized database.
- ✓When you want to keep database passwords out of the command line.
- ✓When you want quiet or detailed output from a health check run.
Skill link
https://github.com/major/MySQLTuner-perl/blob/master/.agent/skills/cli-execution-mastery/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Run MySQLTuner against my remote MySQL server without typing the password in the command.”
5 new skills a week. 1 minute to read.
How it works
The agent picks the right connection options for your setup, such as a socket, host or container, and uses a settings file or environment variables for the login instead of the command line.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
CLI Execution Mastery Skill
🧠 Rationale
Mastering the CLI options of mysqltuner.pl allows for seamless execution across diverse environments while maintaining security and leveraging existing configurations.
🛠️ Implementation
1. Connection Discovery & Targeting
| Target Type | Primary Command/Options |
|---|---|
| Local Socket | perl mysqltuner.pl (Default) | --socket=/path/to/mysql.sock |
| Remote Host | perl mysqltuner.pl --host=1.2.3.4 --port=3306 |
| Container | perl mysqltuner.pl --container=container_name_or_id |
| Cloud/Azure | perl mysqltuner.pl --cloud --azure |
2. Authentication Strategies
[!IMPORTANT] Avoid passing passwords directly via
--passon the command line to prevent exposure in process lists.
Preferred:
.my.cnfUsage- Use
--defaults-file=/path/to/.my.cnfto point to a specific configuration file. - The script automatically respects common paths if not specified.
- Use
Environment Variables
- Use
--userenv=MY_USER_VARand--passenv=MY_PASS_VARto leverage pre-set credentials.
- Use
Password Files
- Use
--passwordfile=/path/to/passwords.txtfor batch security auditing.
- Use
3. Execution Contexts
- Standard Verbose Run:
perl mysqltuner.pl --verbose(Recommended for full diagnostics). - Silent Mode:
perl mysqltuner.pl --silent(Useful for automated data collection). - JSON Output:
perl mysqltuner.pl --jsonor--prettyjson(For integration with other tools).
4. Debugging Connections
If connection fails, use these flags to diagnose:
--debug: Enables full debug output.--dbgpattern='.*': Filters debug information with regex.- Verify
mysqlcmdpath if custom binaries are used:--mysqlcmd=/usr/local/bin/mysql.
5. MariaDB InnoDB Variable Compatibility
As MariaDB evolves, several InnoDB system variables have been removed or deprecated. mysqltuner.pl detects these to avoid legacy configuration overhead.
| Parameter | Removed/Deprecated In | Note/Replacement |
|---|---|---|
have_innodb |
Removed 10.0 | Use SHOW ENGINES or I_S.PLUGINS. |
innodb_adaptive_flushing_method |
Removed 10.0 | Replaced by MySQL 5.6 flushing logic. |
innodb_checksums |
Removed 10.0 | Use innodb_checksum_algorithm. |
innodb_stats_sample_pages |
Removed 10.5.0 | Use innodb_stats_transient_sample_pages. |
innodb_file_format / _check / _max |
Removed 10.6.0 | Antelope and Barracuda are legacy concepts. |
innodb_large_prefix |
Removed 10.6.0 | Always enabled in newer versions. |
innodb_locks_unsafe_for_binlog |
Removed 10.6.0 | No longer supported. |
innodb_prefix_index_cluster_optimization |
Deprecated 10.10 | Always enabled now. |
6. MySQL InnoDB Variable Compatibility
| Parameter | Removed/Deprecated In | Note/Replacement |
|---|---|---|
innodb_locks_unsafe_for_binlog |
Removed 8.0 | Use READ COMMITTED isolation level instead. |
innodb_support_xa |
Removed 8.0 | XA support is now always enabled. |
innodb_file_format family |
Removed 8.0 | Barracuda is the only supported format. |
innodb_large_prefix |
Removed 8.0 | Always enabled for Barracuda. |
tx_isolation / tx_read_only |
Removed 8.0 | Use transaction_isolation / transaction_read_only. |
innodb_undo_logs |
Removed 8.0 | Replaced by innodb_rollback_segments. |
innodb_undo_tablespaces |
Removed 9.0 | Managed automatically now. |
innodb_log_file_size |
Removed 9.0 | Replaced by innodb_redo_log_capacity. |
innodb_api_... variables |
Removed 8.4 | Memcached-related variables removed. |
✅ Verification
- Run
perl mysqltuner.pl --helpto confirm availability of these options. - Use
execute_system_commandto test connectivity with specific flags in the target environment.
FAQ
Why avoid typing the password on the command line?
Command line passwords can be seen in the list of running processes, so the skill prefers a settings file or environment variables.
Can it check cloud databases?
The skill includes cloud and Azure options.
Is there a quieter output option?
Yes. A silent mode suits automated collection, and a verbose mode gives full diagnostics.
Details
Original description by the author
Mastery of MySQLTuner CLI options for connection and authentication.
repo: major/MySQLTuner-perl
Popularity
- GitHub stars
- 9.5k
- Ranking position
- #12277
- License
- GPL-3.0
- Updated
- 10/28/2026
Comments
- …
More skills from this repository
analyze_buffer_pool
9.5kHelps your database agent check how well MySQL or MariaDB uses its InnoDB memory cache, spot disk write stalls and suggest a sensible buffer pool size.
detect_fragmented_tables
9.5kHelps your agent find database tables that waste disk space through fragmentation, and suggest safe ways to reclaim it, with notes on how much each cleanup affects the server.
diagnose_replication_lag
9.5kHelps your agent check whether a MySQL or MariaDB replica has fallen behind its main server, and find any failed replication threads and their errors.
Similar skills
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
clickhouse-io
280kHelps your agent optimize queries and schemas in ClickHouse databases. It applies best practices for high-performance analytical workloads. Use when analytical queries are too slow.
scientific-db-pubmed-database
280kHelps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.