使用 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. ...
随机推荐
- C#工具:分词辅助类
using System; using System.Collections; using System.IO; using System.Text.RegularExpressions; names ...
- EF Core 快速上手——EF Core的三种主要关系类型
系列文章 EF Core 快速上手--EF Core 入门 本节导航 三种数据库关系类型建模 Migration方式创建和习修改数据库 定义和创建应用DbContext 将复杂查询拆分为子查询 本 ...
- foreach(Element elem in selections.Elements)无法实现
因为版本问题 原:foreach(Element elem in selections.Elements){ } 现: ElementSet selections = new ElementSet() ...
- 学JAVA第十五天,方法重载及构造方法进一步了解
由于星期五生病了,所以就没写.今天上课,又来写了!!! 先来说方法的重载. 方法的重载就是有两个方法的方法名相同,但参数不一致,参数个数不一致,或参数的类型不一样. package pkg9;publ ...
- PHP数字金额转换大写金额
早些年做CRM用到的一个金额转换函数,今天从旧项目中拿出来记录一下.金额转换的函数方法有很多,都很不错.不过这个是小崔刚工作的时候写的一个转换函数,多少还是有点纪念意义.如有问题请朋友们指出,小崔及时 ...
- Android Studio教程07-Fragment的使用
目录 1. Fragment是什么 1.1. 设计原理和实例 2. 创建fragment 2.1. fragment的生命周期 2.2 添加用户界面:融入到Activity中 3. 管理fragmen ...
- 自己动手写事件总线(EventBus)
本文由云+社区发表 事件总线核心逻辑的实现. EventBus的作用 Android中存在各种通信场景,如Activity之间的跳转,Activity与Fragment以及其他组件之间的交互,以及在某 ...
- ASP.NET Zero--基础设施
基础设施 启动类 ASP.NET Core从应用程序中的Startup类初始化.我们在这个类中配置所有库(包括ABP).我们建议您先检查此课程.它也被集成到 OWIN.所以,你可以在这里添加OWIN中 ...
- SQLServer之创建数据库快照
创建数据库快照注意事项 语法:set transaction isolation level snapshot; 指定事务中任何语句读取的数据都将是在事务开始时便存在的数据的事务上一致的版本. 事务只 ...
- sql 按年月日统计
1.每年select year(ordertime) 年,sum(Total) 销售合计from 订单表group by year(ordertime) 2.每月select year(orderti ...