• 使用 mysqltuner 检测 mysql 稳定性


    github : https://github.com/major/MySQLTuner-perl 

    MySQLTuner是一个用Perl编写的脚本,它可以帮助您进行MySQL配置,并提出增强性能和稳定性的建议。

    installl:

    1,cd /usr/local/bin && curl -O https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

    2,chmod +x ./mysqltuner.pl && ./mysqltuner.pl --version && alias mysqltuner='perl /usr/local/bin/mysqltuner.pl' ;

    3-

    help:

    Usage:

    Name:
    MySQLTuner 1.7.15 - MySQL High Performance Tuning Script

    Important Usage Guidelines:
    To run the script with the default options, run the script without
    arguments Allow MySQL server to run for at least 24-48 hours before
    trusting suggestions Some routines may require root level privileges
    (script will provide warnings) You must provide the remote server's
    total memory when connecting to other servers

    Connection and Authentication: 连接和验证
    --host <hostname> Connect to a remote host to perform tests (default: localhost)
    --socket <socket> Use a different socket for a local connection
    --port <port> Port to use for connection (default: 3306)
    --user <username> Username to use for authentication
    --userenv <envvar> Name of env variable which contains username to use for authentication
    --pass <password> Password to use for authentication
    --passenv <envvar> Name of env variable which contains password to use for authentication
    --ssl-ca <path> Path to public key
    --mysqladmin <path> Path to a custom mysqladmin executable
    --mysqlcmd <path> Path to a custom mysql executable
    --defaults-file <path> Path to a custom .my.cnf

    Performance and Reporting Options:   绩效和报告选项
    --skipsize Don't enumerate tables and their types/sizes (default: on)
    (Recommended for servers with many tables)
    --skippassword Don't perform checks on user passwords(default: off)
    --checkversion Check for updates to MySQLTuner (default: don't check)
    --updateversion Check for updates to MySQLTuner and update when newer version is available (default: don't check)
    --forcemem <size> Amount of RAM installed in megabytes
    --forceswap <size> Amount of swap memory configured in megabytes
    --passwordfile <path> Path to a password file list(one password by line)

    Output Options: 输出选项
    --silent Don't output anything on screen
    --nogood Remove OK responses
    --nobad Remove negative/suggestion responses
    --noinfo Remove informational responses
    --debug Print debug information
    --noprocess Consider no other process is running
    --dbstat Print database information
    --nodbstat Don't Print database information
    --tbstat Print table information
    --notbstat Don't Print table information
    --idxstat Print index information
    --noidxstat Don't Print index information
    --sysstat Print system information
    --nosysstat Don't Print system information
    --pfstat Print Performance schema
    --nopfstat Don't Print Performance schema
    --verbose Prints out all options (default: no verbose, dbstat, idxstat, sysstat, tbstat, pfstat)
    --bannedports Ports banned separated by comma(,)
    --maxportallowed Number of ports opened allowed on this hosts
    --cvefile <path> CVE File for vulnerability checks
    --nocolor Don't print output in color
    --json Print result as JSON string
    --buffers Print global and per-thread buffer values
    --outputfile <path> Path to a output txt file
    --reportfile <path> Path to a report txt file
    --template <path> Path to a template file

    • Log file Recommendations 日志文件建议 -----
    • Storage Engine Statistics 存储引擎统计-----
    • Analysis Performance Metrics 分析性能指标 -----
    • Security Recommendations 安全建议-----
    • CVE Security Recommendations CVE安全建议-----
    • Performance schema 性能架构-----
    • ThreadPool Metrics 线程池度量标准-----
    • MyISAM Metrics-----
    • AriaDB Metrics -----
    • TokuDB Metrics-----
    • XtraDB Metrics -----
    • Galera Metrics -----
    • Replication Metrics 复制指标------
    • Recommendations 建议------

  • 相关阅读:
    PAT乙级1002. 写出这个数 (20)
    PAT乙级1001. 害死人不偿命的(3n+1)猜想 (15)
    HDU 4520 小Q系列故事——最佳裁判
    POJ 3414 Pots(BFS)
    POJ 1118 Lining Up
    POJ 2484 A Funny Game
    POJ 2231 Moo Volume
    HDU 5718 Oracle(高精度)
    FZU 1502 Letter Deletion(DP)
    HDU 1564 Play a game
  • 原文地址:https://www.cnblogs.com/q1104460935/p/10623712.html
Copyright © 2020-2023  润新知