Percona-toolkit User Guide-configuration tool-MySQL

Source: Internet
Author: User
Tags percona
Percona-toolkit usage tutorial-configuration tools 1. pt-config-diff

L function introduction:

Compare mysql configuration files and server parameters

L usage:

Pt-config-diff [OPTION...] CONFIG [CONFIG...]

CONFIG can be a file or a data source name. at least two configuration file sources must be specified, just like the diff command under unix. if the configuration is exactly the same, nothing will be output.

L example:

Example 1: view the differences between the local and remote server configuration files:

Pt-config-diff h = localhost h = 192.168.3.92 -- user = root -- password = zhang @ 123

The comparison content is as follows:

22 config differences

Variable localhost. localdomain localhost. localdomain

========================================================== ======================================

Binlog_cache_size 8388608 2097152

Have_ndbcluster DISABLED NO

Innodb_additional_mem _... 16777216 33554432

Innodb_buffer_pool_size 1677721600 1073741824

Example 2: compare the differences between local configuration files and remote servers:

Pt-config-diff/etc/my. cnf h = 192.168.3.92 -- user = root -- password = zhang @ 123

The comparison content is as follows:

12 config differences

Variable/etc/my. cnf localhost. localdomain

========================================================== ========================

Binlog_cache_size 8388608 2097152

Binlog_format mixed MIXED

Example 3: compare the differences between two local configuration files:

Pt-config-diff/usr/local/mysql/share/mysql/my-large.cnf/usr/local/mysql/share/mysql/my-medium.cnf

2. pt-mysql-summary

L function introduction:

The configuration of mysql and the sataus information are summarized in detail. After the summary, you can see it at a glance.

L usage:

Pt-mysql-summary [OPTIONS] [-- mysql options]

Working Principle: Connect to mysql and query the status and configuration information and save it to the temporary directory. Then, use awk and other script tools for formatting. OPTIONS can be found on the official website.

L example:

Example 1: summarize the status and configuration information of the local mysql server:

Pt-mysql-summary -- user = root -- password = zhang @ 123 -- host = localhost

Example 2: summarize the status and configuration information of the local mysql server 192.168.3.92:

Pt-mysql-summary -- user = root -- password = zhang @ 123 -- host = 192.168.3.92

3. pt-variable-advisor

L function introduction:

Analyze mysql parameter variables and provide suggestions for possible problems

L usage:

Pt-variable-advisor [OPTION...] [DSN]

Principle: check the configuration error settings and values in show variables according to predefined rules.

L example:

Example 1: Get the variable value from localhost

Pt-variable-advisor -- user = root -- password = zhang @ 123 localhost

Example 2: Read the configuration from the specified file. the format is required.

Pt-variable-advisor -- user = root -- password = zhang @ 123 -- source-of-variables my. cnf

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.