使用 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 建议------

转载于:https://www.cnblogs.com/q1104460935/p/10623712.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值