MySQL Tuning tool

Source: Internet
Author: User

:

https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl


Direct use

wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

You can download it.


chmod +x mysqltuner.pl

./mysqltuner.pl then enter the user name and password.

It's my test results on a single online server.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8A/2C/wKioL1gqcdmzJ3xkAACHLnEzXTQ198.png "title=" Dfdsd.png "alt=" Wkiol1gqcdmzj3xkaachlnezxtq198.png "/>


Browse the results of the output, especially the recommendations at the end, which generally mentions what you need to modify in my.cnf. Remember to restart MySQL after modifying my.cnf. Restart and then run the Mysqltuner check.

It is also important to note that MySQL needs to start 24 hours before running Mysqltuner, or some content will not be allowed.


In addition, the./mysqltuner.pl--help can show which parameters are supported.

Connection and authentication

--host

--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

--pass <password> password to use for authentication

--defaults-file <path> path to a custom. my.cnf

--mysqladmin <path> Path to a custom mysqladmin executable

--mysqlcmd <path> Path to a custom MySQL executable


--noask Don ' t ask password if needed


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

--dbstat Print Database Information

--idxstat Print Index Information

--sysstat Print System Information

--pfstat Print Performance schema information

--bannedports Ports banned separated by comma (,)

--maxportallowed number of ports opened allowed on the this hosts

--cvefile CVE File for vulnerability checks

--nocolor Don ' t print output in color

--json Print result as JSON string

--prettyjson Print result as human readable JSON

--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


--verbose Prints out all options (Default:no verbose)


For example I have 1 servers, which run on multi-instance MySQL above, medical examination words, need to use

./mysqltuner.pl--socket/data/multi_instance/3306/mysql.sock



MySQL Tuning tool

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.