MySQL master-Slave synchronization Verification Tool

Source: Internet
Author: User
Tags vars percona

(1), Pt-table-checksum tool name (2), installation Pt-table-checksum#:wget www.percona.com/downloads/percona-toolkit/2.2.2/ PERCONA-TOOLKIT-2.2.2.TAR.GZ#:TAR-XVF percona-toolkit-2.2.2.tar.gz#:p erl makefile.pl # make && make install (3 ), authorized Grant Update,insert,delete,select, PROCESS, SUPER, REPLICATION SLAVE on * * to ' tugeadmin ' @ ' 192.168.100.206 ' Identified by ' peshome0716 '; creating a table Create tables checksums (db char (+) not NULL, tbl Char (64 ) not NULL, chunk int not null, chunk_time float NULL, Chunk_index varchar (2     XX) NULL, lower_boundary text null, upper_boundary text null, THIS_CRC char (40)              Not NULL, this_cnt int NOT null, MASTER_CRC char (+) NULL, master_cnt int NULL, TS timestamp not NULL, PRIMARY KEY (db, TBL, chunk), INDEX ts_db_tbl (TS, DB, tbl)) engine= InnoDB; (4), start verifying pt-table-checksum--nocheck-replication-filters--databases=tuge--replicate=tuge.checksums--create-replicate-table-h192.168.100.206--port 3306- utugeadmin-ppeshome0716--set-vars innodb_lock_wait_timeout=120--no-check-binlog-format (5), Validation instructions--nocheck-replication-filters: Do not check for replication filters, it is recommended to enable. You can use--databases later to specify the database you want to check. --no-check-binlog-format: Do not check the copy of the Binlog mode, if the Binlog mode is row, will be an error. --replicate-check-only: Displays only information that is not synchronized. --replicate=: Writes the checksum information to the specified table, it is recommended to write directly to the database being checked, (this is written to the checksums of the Tuge library)  If you do not have a checksums library. You need to create one manually. Each time the monitoring is complete, kill it. The library table can be arbitrarily assigned. Personal advice to put it in test. Create a checksums table in test. --replicate=test.checksums--databases=: Specifies the database that needs to be checked, and multiple are separated by commas. --tables=: Specifies the table to be checked, multiple addresses separated by commas H=127.0.0.1:master u=root: User name p=123456: password p=3306: port (6), common error Common error:--set-vars innodb_lock_wait_timeout=120 use timeout to skip this error prompt.


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.