mysqltuner

http://mysqltuner.com/

MySQLTuner-perl

MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.

View the Project on GitHubmajor/MySQLTuner-perl

MySQLTuner-perl

MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief format along with some basic performance suggestions.

[[email protected] ~]# perl mysqltuner.pl --host 127.0.0.1 --user root --password "" --port 3310
 >>  MySQLTuner 1.6.13 - Major Hayden <[email protected]>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with ‘--help‘ for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[--] Performing tests on 127.0.0.1:3310
[OK] Logged in using credentials passed on the command line
[OK] Currently running supported MySQL version 5.6.27
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA
[--] Data in InnoDB tables: 2G (Tables: 33)
[OK] Total fragmented tables: 0

-------- Security Recommendations ------------------------------------------------------------------
[!!] User ‘@localhost‘ is an anonymous account.
[!!] User ‘@server-mysql‘ is an anonymous account.
[!!] User ‘@localhost‘ has no password set.
[!!] User ‘@server-mysql‘ has no password set.
[!!] User ‘[email protected]%‘ has no password set.
[!!] User ‘[email protected]‘ has no password set.
[!!] User ‘[email protected]::1‘ has no password set.
[!!] User ‘[email protected]‘ has no password set.
[!!] User ‘[email protected]‘ has no password set.
[!!] User ‘@localhost‘ has user name as password.
[!!] User ‘@server-mysql‘ has user name as password.
[!!] User ‘[email protected]%‘ hasn‘t specific host restriction.
[!!] There is no basic password file list!

-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined

-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 3h 24m 11s (1K q [0.160 qps], 389 conn, TX: 3M, RX: 91K)
[--] Reads / Writes: 99% / 1%
[--] Binary logging is disabled
[--] Physical Memory     : 1.3G
[--] Max MySQL memory    : 646.7M
[--] Other process memory: 154.7M
[--] Total buffers: 73.0M global + 1.1M per thread (151 max threads)
[--] P_S Max memory usage: 403M
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 480.2M (36.03% of installed RAM)
[OK] Maximum possible memory usage: 646.7M (48.52% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/1K)
[OK] Highest usage of available connections: 1% (3/151)
[OK] Aborted connections: 0.00%  (0/389)
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 14 sorts)
[OK] No joins without indexes
[OK] Temporary tables created on disk: 5% (320 on disk / 6K total)
[OK] Table cache hit rate: 92% (117 open / 127 opened)
[OK] Open file limit used: 0% (46/5K)
[OK] Table locks acquired immediately: 100% (400 immediate / 400 locks)

-------- Performance schema ------------------------------------------------------------------------
[--] Performance schema is enabled.
[--] Memory used by P_S: 403.8M
[--] Sys schema is installed.

-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.

-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.3% (1M used / 8M cache)
[OK] Key buffer size / total MyISAM indexes: 8.0M/108.0K
[OK] Read Key buffer hit rate: 99.5% (574 cached / 3 reads)

-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is disabled.

-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[!!] InnoDB buffer pool / data size: 32.0M/2.8G
[!!] InnoDB buffer pool <= 1G and innodb_buffer_pool_instances(!=1).
[!!] InnoDB Used buffer: 22.77% (466 used/ 2047 total)
[OK] InnoDB Read buffer efficiency: 94.41% (7664 hits/ 8118 total)
[!!] InnoDB Write Log efficiency: 16.67% (9 hits/ 54 total)
[OK] InnoDB log waits: 0.00% (0 waits / 45 writes)

-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.

-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.

-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] This is a standalone server.

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
    Remove Anonymous User accounts - there are 2 anonymous accounts.
    Set up a Password for user with the following SQL statement ( SET PASSWORD FOR ‘user‘@‘SpecificDNSorIp‘ = PASSWORD(‘secure_password‘); )
    Set up a Secure Password for [email protected] ( SET PASSWORD FOR ‘user‘@‘SpecificDNSorIp‘ = PASSWORD(‘secure_password‘); )
    Restrict Host for [email protected]% to [email protected]
    MySQL started within last 24 hours - recommendations may be inaccurate
Variables to adjust:
    innodb_buffer_pool_size (>= 2G) if possible.
    innodb_buffer_pool_instances (=1)
[[email protected]-mysql ~]# 
时间: 2024-10-01 06:46:15

mysqltuner的相关文章

mysql参数优化辅助工具之mysqltuner

Mysqltuner.sql 的使用和安装. Mysqltuner 是一个mysql参数优化辅助工具,它可以对mysql进行全面的体检,然后给出针对性的体检报告 1.mysqltuner 下载 mysqltuner 官网:http://mysqltuner.com/ 可以下载最新版本的. 2.mysqltuner 的安装和使用. Mysqltuner  就是一套perl脚本,不需要任何的安装,将下载下来的tar安装包解压下就行了. [[email protected] software]# ta

How to Install MySQL on CentOS 7

How to Install MySQL on CentOS 7 Updated Thursday, August 27th, 2015 by Linode Use promo code DOCS10 for $10 credit on a new account. Try this Guide Contribute on GitHub View Project | View File | Edit File MySQL is a popular database management syst

mysql性能瓶颈分析、性能指标、指标搜集方法与性能分析调优工具

本文主要讲解mysql的性能瓶颈分析.性能指标.性能指标信息的搜集工具与方法.分析调优工具的使用. 文章尚未完成. 性能瓶颈: 慢.写速度比读速度慢很多  主要的性能指标: 访问频度, 并发连接量, 缓存命中率, index使用, slow log开启与分析, query Log,查询log Threads_cached:连接线程缓存是否开启  -> ONthread_cache_size :线程缓存数的大小query_cache_size: 查询缓存大小join_buffer_size :jo

腾讯云CentOS7.0使用yum安装mysql

背景: 今天才申请了腾讯云+校园计划的1元服务器,(http://www.qcloud.com/event/qcloudSchool)安装了Centos7.0,在安装mysql的时候,使用yum list | grep mysql 来查找yum源中是否有mysql,结果如下: [[email protected]_47_56_centos ~]# yum list | grep mysql akonadi-mysql.x86_64 1.9.2-4.el7 base apr-util-mysql.

MySQL内存分配

原文链接: MySQL Memory Allocation -- by Rick James 原文日期: Created 2010; Refreshed Oct, 2012, Jan, 2014 翻译人员: 铁锚 翻译日期: 2014年5月28日 MySQL 内存分配-- 快速设置方案 如果仅使用MyISAM存储引擎,设置 key_buffer_size 为可用内存的20%,(再加上设置 innodb_buffer_pool_size = 0 ) 如果仅使用InnoDB存储引擎,设置 innod

高性能PHP应用开发-总结

最近将<高性能PHP应用开发>这本书看了两遍,觉得还是受益匪浅的,该书讲的面比较广,都是经验性的内容,建议大家有时间可以详细看一下的,基于此特意将本书的精华易用的部分加以整理,子曰:“温故而知新,可以为师矣.” [第一章  基准测试工具] 一:Apache Benchmark (ab) 随 apache包一起安装ab -n (请求数) -c (并发数,不能起过-n) -t (请求的秒数) http://url 报告中最重要的是以下字段内容:-------------------------HT

操作笔记:linux下安装mysql

1,检查linux下是否安装了mysql shell指令如下: [[email protected] ~]# rpm -qa|grep -i mysql 如果有的话:做出挨个删除(eg:rpm -ev mysql-connector-odbc-5.2.5-6.el7.x86_64) [[email protected] ~]# rpm -qa|grep -i mysql mysql-connector-odbc-5.2.5-6.el7.x86_64 mysql-proxy-devel-0.8.5

c语言连接MySQL

今天在网上查询了一些关于c语言连接MySQL的一些资料,现在做一下总结. 首先,自己的电脑要安装MySQL,具体的做法是打开终端("Ctrl + Alt + t"),然后输入命令"sudo apt-get install mysql",再连按2下Tab键,目的是查看自己当前的软件源中有关MySQL的信息. [email protected]:~$ sudo apt-get install mysql mysql-client mysql-mmm-monitor my

15 个有用的 MySQL/MariaDB 性能调整和优化技巧(转载的一篇好文)

MySQL 是一个强大的开源关系数据库管理系统(简称 RDBMS).它发布于 1995 年(20年前).它采用结构化查询语言(SQL),这可能是数据库内容管理中最流行的选择.最新的 MySQL 版本是 5.6.25,于 2015 年 5 月 29 日发布. 关于 MySQL 一个有趣的事实是它的名字来自于 Michael Widenius(MySQL 的创始人)的女儿“ My”.尽管有许多关于 MySQL 有趣的传闻,不过本文主要是向你展示一些有用的实践,以帮助你管理你的 MySQL 服务器.