mysql数据库优化器_mysql数据库运维利器-一键生成MySQL数据库优化建议-【安基网】...

概述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.

MySQLTuner supports ~300 indicators for MySQL/MariaDB/Percona Server in this last version.

今天主要分析一个实用脚本,一键生成MySQL数据库优化建议。

1、下载脚本wget http://mysqltuner.pl/ -O mysqltuner.pl

wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt

wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv

4698ba22731dc79a73ae8d4aeeb4ad1a.png

2、用法

Usage: Minimal usage remotelyperl mysqltuner.pl --host targetDNS_IP --user admin_user --pass admin_password

Usage: Enable maximum output information around MySQL/MariaDb without debuggingperl mysqltuner.pl --verbose

perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat --tbstat

Usage: Enable CVE vulnerabilities check for your MariaDB or MySQL versionperl mysqltuner.pl --cvefile=vulnerabilities.csv

Usage: Write your result in a file with information displayedperl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt

Usage: Write your result in a file without outputting informationperl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt

Usage: Using template model to customize your reporting file based on Text::Template syntax.perl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/tmp/mymodel.tmpl

Usage: Enable debugging informationperl mysqltuner.pl --debug

Usage: Update MySQLTuner and data files (password and cve) if neededperl mysqltuner.pl --checkversion --updateversion

3、实例

简单测试如下:

I87S6F75Awz9qS78qqg1G5.jpg

cnn1Nrt8m595ZV51DQ5t6R.jpg

zwbbZz7L11p62b19hbYLW2.jpg

78b89378971cdade9e727054eb3b014c.pngperl mysqltuner.pl --host localhost --user root --pass 密码 --buffers --dbstat --idxstat --sysstat --pf

stat --tbstat

Id2DUusfho4772zbhhDWnh.jpg

剩下的就靠大家自己挖掘了...

觉得有用的朋友多帮忙转发哦!后面会分享更多devops和DBA方面的内容,感兴趣的朋友可以关注下~

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值