使用 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 建议------
-
使用 mysqltuner 检测 mysql 稳定性的更多相关文章
- 写一个简单脚本检测mysql主从是否正常
这个脚本是在从服务器上执行的 [root@bogon ~]# cat a.sh #!/bin/bash #下面这行目的在于检测mysql端口是否开启,如果没有开启,那说明mysql服务都没有开启,直接 ...
- 脚本_检测mysql存活状态
#!bin/bash#功能:检测mysql服务是否存活#作者:liusingbon# host为你需要检测的mysql主机的IP 地址,user为mysql账户名,passwd为密码; 这些信息需要根 ...
- 脚本_检测 MySQL 数据库连接数量
#!bin/bash#功能:检测 MySQL数据库连接数量,以满足对 MySQL 数据库的监控需求,查看 MySQL 连接是否正常.#作者:liusingbon#本脚本每 2 秒检测一次 MySQL ...
- 检测 MySQL 服务是否存活 shell脚本
#!/bin/bash # 检测 MySQL 服务是否存活 # host 为你需要检测的 MySQL 主机的 IP 地址,user 为 MySQL 账户名,passwd 为密码 # 这些信息需要根据实 ...
- 借助 MySQLTuner 优化 MySQL 性能(转载的一篇文章)
MySQLTuner 是一个 Perl 脚本,可以用来分析您的 MySQL 性能,并且基于收集到的信息给出相应的优化建议.这样子,您就可以调整 my.cnf 从而优化您的 MySQL 设置. 这边只是 ...
- 开发检测MySQL主从同步插件
Nagios的状态码 OK 退出码0,表示正常工作 WARNING 退出码1,表示处于警告阶段 CRITICAL 退出码2,表示处于紧急状态,严重状态 UNKOEN 退出码3,表示无法获取 ...
- Zabbix检测Mysql数据库的主从同步
在高并发网站架构中,MySQL数据库主从同步是不可或缺的,不过经常会发生由于网络原因或者操作错误,MySQL主从经常会出现不同步的情况,那么如何监控MySQL主从同步,也变成检测网站正常运行的重要环节 ...
- [zabbix] zabbix检测mysql主从状态
环境说明: zabbix-proxy 172.16.2.95(zabbix-server同理) zabbix-agent111 172.16.2.111 mysql从机 1.mysql从机添加用户权限 ...
- 031_检测 MySQL 服务是否存活
#!/bin/bash#host 为你需要检测的 MySQL 主机的 IP 地址,user 为 MySQL 账户名,passwd 为密码#这些信息需要根据实际情况修改后方可使用 host=127.0. ...
随机推荐
- DSAPI QQ用户相关
获取指定QQ号头像 Label1.Image=DSAPI.QQ用户相关.下载QQ头像("20353841") 获取指定QQ群头像 Label1.Image = DSAPI.QQ用户 ...
- C#实现.ini文件读写操作
1.ini文件是什么? 见百度百科:https://baike.baidu.com/item/ini%E6%96%87%E4%BB%B6/9718973?fr=aladdin 2.C#语 ...
- 系统设计Design For Failure思想
系统设计Design For Failure思想 Complex systems fail in spectacular ways. Failure isn't a question of if, b ...
- .net core jwt 入门记录
从百度里搜索里搜索了很多jwt的文章,跟着文章写了一个demo,这里记录下学习过程中碰上的问题.看文章多遍,不如手工实现一次. 模板已上传到github.com:dogvane/webapi_jwt_ ...
- loj#6041. 「雅礼集训 2017 Day7」事情的相似度(SAM set启发式合并 二维数点)
题意 题目链接 Sol 只会后缀数组+暴躁莫队套set\(n \sqrt{n} \log n\)但绝对跑不过去. 正解是SAM + set启发式合并 + 二维数点/ SAM + LCT 但是我只会第一 ...
- MQTT简单介绍与实现
1. MQTT 介绍它是一种 机器之间通讯 machine-to-machine (M2M).物联网 Internet of Things (IoT)常用的一种轻量级消息传输协议适用于网络带宽较低的场 ...
- DVWA 黑客攻防实战(十五) 绕过内容安全策略 Content Security Policy (CSP) Bypass
看到标题,是否有点疑惑 CPS 是什么东东.简单介绍一下就是浏览器的安全策略,如果 标签,或者是服务器中返回 HTTP 头中有 Content-Security-Policy 标签 ,浏览器会根据标签 ...
- Centos7 使用 kubeadm 安装Kubernetes 1.13.3
目录 目录 什么是Kubeadm? 什么是容器存储接口(CSI)? 什么是CoreDNS? 1.环境准备 1.1.网络配置 1.2.更改 hostname 1.3.配置 SSH 免密码登录登录 1.4 ...
- 关掉那些windows上因权限无法关闭的服务
ProcessExplorer 下载地址 :https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer 以管理员身 ...
- hashtable 简单介绍
Hashtable 1 注意小写 table 2 常用方法 void clear() boolean contains(Object value) ...