MySQL Performance Tuning and Monitoring Scripts
Performance Tuning Tools
- MySQLTuner: a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.
wget http://mysqltuner.pl/ -O mysqltuner.pl
perl mysqltuner.pl
Advanced Usage :
Minimal usage remotely
perl mysqltuner.pl --host targetDNS_IP --user admin_user --pass admin_password
Usage: Enable maximum output information around MySQL/MariaDb without debugging
perl mysqltuner.pl --verbose
perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat
Usage: Enable CVE vulnerabilities check for your MariaDB or MySQL version
perl mysqltuner.pl --cvefile=vulnerabilities.csv
Usage: Write your result in a file with information displayed
perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt
Usage: Write your result in a file without outputting information
perl 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 information
perl mysqltuner.pl --debug - MySQL Tuning Primer Script - tuning-primer.sh - This script takes information from "
SHOW STATUS LIKE
..." and "SHOW VARIABLES LIKE
..." then attempts to produce some recommendations for tuning server variables.
Currently it handles recomendations for the following:
- Slow Query Log
- Innodb Status
- Max Connections
- Worker Threads
- Key Buffer
- Query Cache
- Sort Buffer
- Joins
- Temp Tables
- Table (Open & Definition) Cache
- Table Locking
- Table Scans (read_buffer)
-
mysqlreport: makes a friendly report of important MySQL status values. mysqlreport transforms the values from SHOW STATUS into an easy-to-read report that provides an in-depth understanding of how well MySQL is running. mysqlreport is a better alternative (and practically the only alternative) to manually interpreting SHOW STATUS.
- phpMyAdmin Advisor : This tool is very similar to the tuning-primer tool. Nice and fast, and likely the most up-to-date tool.
Percona Tools for MySQL : Free online productivity tools for MySQL DBAs, SysAdmins and Developers
Performance Monitoring Tools
- mytop - a top clone for MySQL.
- innotop: you can download the latest version of innotop from Sourceforge.
-
phpMyAdmin Monitor :