使用 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. ...
随机推荐
- Flutter 即学即用系列博客——09 EventChannel 实现原生与 Flutter 通信(一)
前言 紧接着上一篇,这一篇我们讲一下原生怎么给 Flutter 发信号,即原生-> Flutter 还是通过 Flutter 官网的 Example 来讲解. 案例 接着上一次,这一次我们让原生 ...
- 使用JsonProperty Attribute修改返回json
使用JsonProperty Attribute修改返回 json 值的name 本例使用JsonPropertyAttribute在序列化为JSON时更改属性的名称. public class Vi ...
- 菜鸟入门【ASP.NET Core】1:环境安装
下载.NET Core SDK 下载地址:https://www.microsoft.com/net/download/windows https://www.microsoft.com/net/le ...
- :only-child和:only-of-type选择器的比较
:only-child 当元素是唯一的子元素,被选择. HTML代码: <body> <div class="x"> <div>第一个DIV&l ...
- 【RL-TCPnet网络教程】第2章 嵌入式网络协议栈基础知识
第2章 嵌入式网络协议栈基础知识 本章教程为大家介绍嵌入式网络协议栈基础知识,本章先让大家有一个全面的认识,后面章节中会为大家逐一讲解用到的协议. 基础知识整理自百度百科,wiki百科等 ...
- jquery监听textarea内容变化
$('#textarea').bind('input propertychange', function(){ var length = $("#textarea").val(). ...
- memcached 学习
memcached 是什么 特点 协议简单 基于 libevent 的事件处理 内置内存存储方式 memcached 不互相通信的分布式 启动 安装 依赖 libevent 安装命令 下载地址在这个网 ...
- SQL 游标的使用
适用场景:对查询出的结果集遍历,作用类似于其他语言的列表循环语句. 相关语法: --定义游标 DECLARE cr CURSOR FOR( SELECT Cust_ID ,Cust_Name ,IDC ...
- 转://MySQL客户端工具的选择
先说我的选择:SQLyog. 尝试的客户端:Toad for MySQL.MySQL-Front.Navicat for MySQL.SQLyog. 官方下载链接: Toad for MySQL:ht ...
- 类SimpleDateFormat
概述 java.text.DateFormat 是日期/时间格式化子类的抽象类,不能直接使用.我们通过这个类的子类可以帮我们完成日期和文本之间的转换,也就是可以在Date对象与String对象之间进行 ...