MySQL management tool --- PerconaToolkit_MySQL

Source: Internet
Author: User
Tags percona
MySQL management tool --- PerconaToolkit bitsCN.com

MySQL management tool --- Percona Toolkit

Percona Toolkit is a group of advanced command line tools used to manage MySQL and system tasks, including:

1. verify the consistency between the master node and the copied data.

2. effectively Archive record rows

3. identify duplicate indexes

4. Summary of MySQL server

5. analyze and query logs and tcpdump

6. collect important system information when a problem occurs

PT installation:

yum install -y perl-CPAN perl-Time-HiRes   wget http://www.percona.com/downloads/percona-toolkit/LATEST/percona-toolkit-2.1.3-2.noarch.rpm   yum install -y percona-toolkit-2.1.3-2.noarch.rpm  

The tool installation directory is:/usr/bin.

Tar.gz package installation

wget http://www.percona.com/redir/downloads/percona-toolkit/LATEST/percona-toolkit-2.1.3.tar.gz   tar zxf percona-toolkit-2.1.3.tar.gz   cd percona-toolkit-2.1.3   perl Makefile.PL   make   make install  

The tool installation directory is:/usr/local/bin.

Common tool set:

1. server summary pt-summary 2. server disk monitoring pt-diskstats 3. mysql service status summary pt-mysql-summary -- user = root -- password = root 4. slow query logs analysis statistics pt-query-digest/data/logs/mysql/mysql-slow.log 5, table synchronization tools, similar to mk-tables-sync, the usage is slightly different, -- print results more detailed pt-table-sync -- execute -- print -- no-check-slave -- database = world h = '2017. 0.0.1 '-- user = root -- password = 123456 h = '2017. 168.0.212 '-- user = root -- password = 123456 6. monitor the master/slave status and provide it with the IP address password of a mysql server. You can analyze the information of each server in the master-slave architecture, including but not limited to the mysql version, IP address, server ID, and mysql service start time, role (Master/Slave) and slave Status (the number of seconds behind the master server, whether there are errors, and whether the Slave is running ). [Root @ RHCE6 ~] # Pt-slave-find -- host = localhost -- user = rhce6 -- password = rhce6 localhost Version 5.5.23-log Server ID 1 Uptime 05:16:10 (started 2012-08-08T09: 32: 03) replication Is not a slave, has 1 slaves connected, is not read_only Filters Binary logging STATEMENT Slave status Slave mode STRICT Auto-increment 1, offset 1 InnoDB version 1.1.8 +-192.168.0.168 Version 5.5.23-log Server ID 10 Uptime 38: 19 (started 2012-08-08T14: 09: 54) Replication Is a slave, has 0 slaves connected, is not read_only Filters Binary logging STATEMENT Slave status 0 seconds behind, running, no errors Slave mode STRICT Auto-increment 1, offset 1 InnoDB version 1.1.8 7. mysql deadlock monitoring pt-deadlock-logger h = '2017. 0.0.1 '-- user = root -- password = 123456 8. primary key conflict check pt-duplicate-key-checker -- database = world h = '2017. 0.0.1 '-- user = root -- password = 123456 9. monitor slave database replication latency ### run the test command to cause the SQL thread on the slave database to crash pt-slave-delay -- host 192.168.0.206 -- user = root -- password = 123456

BitsCN.com

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.