Mysql Replication Tool (Percona-toolkit)

Source: Internet
Author: User
Tags percona

Mysql Copy Tool

1.percona-toolkit Introduction

Percona-toolkit is a collection of advanced command-line tools used to perform a variety of manual execution of very complex and cumbersome MySQL and System tasks, these tasks include:

    • check Master and slave data consistency
    • effectively archive records
    • find duplicate index
    • Summary of server information
    • analysis from logs and tcpdump query
    • Span style= "color: #555555; Font-family: "The song body" and collect important system information when the system goes wrong

Percona-toolkit from Maatkit and the Aspersa Tools, these two tools are managed MySQL the most famous tool, now Maatkit The tool has not been maintained, please use Percona-toolkit it! These tools mainly include development, performance, configuration, monitoring, replication, System, practical six categories, as a good DBA, some of the tools are very useful, if you can master and flexible application, will greatly improve productivity.

?

2. Installing percona-toolkit

[Email protected] ~]# yum-y install percona-toolkit-2.2.4-1.noarch.rpm

?

[email protected] ~]# PT #以pt开头命令

?

3. Simple to use

(1). Server Summary

[Email protected] ~]# pt-summary

(2). Server disk Monitoring

[Email protected] ~]# pt-diskstats

(3). mysql Service Status Summary

[Email protected] ~]# pt-mysql-summary----user=root

?

(4). Slow query log analysis statistics

?

?

[email protected] ~]# Pt-query-digest/mydata/data/mysql-slow.log

?

(5).master-Slave condition monitoring, provided to it aMySQLServer'sIPUser name password, you can analyze the information of each server in the master/slave architecture, including but not limited toMySQLversions,IPaddress,Server ID,MySQLthe start time of the service, the role (primary/from),Slave Status (How many seconds lag behind the master server,There are no errors,slaveThere is no running).

?

[Email protected] ~]# Pt-slave-find--host=localhost--user=root

(6). mysql Deadlock Monitoring

[Email protected] ~]# pt-duplicate-key-checker--database=xxx h= ' 127.0.0.1 '--user=root--password=xxxx

View a XXX database, the password is set when you authorize, or you can have no password

?

(7). monitoring replication latency from a library

?

[email protected] ~]# pt-slave-delay--host xxx --user=root--password=xxx

?

?

?

?

?

?

?

?

Mysql Replication Tool (Percona-toolkit)

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.