본문으로 건너뛰기
Skillpedia
데이터베이스9.5k · #12277

cli-execution-mastery

하는 일

이 스킬은 여러 데이터베이스 환경에서 MySQLTuner 점검 도구를 실행하는 방법을 설명합니다. 점검이 안전하게 연결되기를 원하는 데이터베이스 관리자를 위한 것입니다.

사용하는 경우

  • ✓로컬, 원격, 컨테이너 환경의 데이터베이스를 MySQLTuner로 점검해야 할 때.
  • ✓데이터베이스 비밀번호를 명령줄에 쓰지 않고 싶을 때.
  • ✓상태 점검 결과를 조용하게 또는 자세하게 보고 싶을 때.

스킬 링크

https://github.com/major/MySQLTuner-perl/blob/master/.agent/skills/cli-execution-mastery/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/major/MySQLTuner-perl/blob/master/.agent/skills/cli-execution-mastery/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“비밀번호를 명령에 입력하지 않고 제 원격 MySQL 서버에 MySQLTuner를 실행해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 소켓, 호스트, 컨테이너 등 환경에 맞는 연결 옵션을 고르고, 명령줄 대신 설정 파일이나 환경 변수로 로그인 정보를 전달합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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 --pass on the command line to prevent exposure in process lists.

  • Preferred: .my.cnf Usage

    • Use --defaults-file=/path/to/.my.cnf to point to a specific configuration file.
    • The script automatically respects common paths if not specified.
  • Environment Variables

    • Use --userenv=MY_USER_VAR and --passenv=MY_PASS_VAR to leverage pre-set credentials.
  • Password Files

    • Use --passwordfile=/path/to/passwords.txt for batch security auditing.

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 --json or --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 mysqlcmd path 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 --help to confirm availability of these options.
  • Use execute_system_command to test connectivity with specific flags in the target environment.
자주 묻는 질문

명령줄에 비밀번호를 입력하면 왜 안 되나요?

명령줄 비밀번호는 실행 중인 프로세스 목록에서 보일 수 있으므로, 이 스킬은 설정 파일이나 환경 변수를 권장합니다.

클라우드 데이터베이스도 점검할 수 있나요?

네. 이 스킬에는 클라우드와 Azure 옵션이 포함되어 있습니다.

더 조용한 출력 옵션이 있나요?

네. 자동 수집에 적합한 조용한 모드와, 전체 진단을 보여 주는 자세한 모드가 있습니다.

상세 정보

작성자의 원본 설명

Mastery of MySQLTuner CLI options for connection and authentication.

repo: major/MySQLTuner-perl

인기도

GitHub 스타
9.5k
순위
#12277
라이선스
GPL-3.0
업데이트
2026. 10. 28.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬