LSX-blog

Feed Rss

【原创】利用pt-table-checksum 检查主从一致

09.24.2013, Linux, MYSQL, by .

官方参照

       http://www.percona.com/doc/percona-toolkit/2.2/pt-table-checksum.html

介绍

       pt-table-checksum是一个Percona的一个小工具,主要可以用于 主从迁移前后的数据检查

是否一致,或者主从复制出现问题,需要确定那些表不一致.

环境

      master:192.168.0.156—–slave:192.168.0.154

      校验数据库:X25

准备工作

1、登陆Slave库 执行如下SQL      

1
2
3
GRANT SELECT, PROCESS, SUPER, REPLICATION SLAVE \
ON *.* TO 'checksums'@'192.168.0.%' IDENTIFIED BY 'checksums';
flush privileges;

2、登陆Master库 创建数据库及表

1
2
3
4
5
6
7
8
9
CREATE DATABASE percona CHARACTER SET utf8;
CREATE TABLE `dsns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `dsn` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
);
INSERT INTO dsns (parent_id,dsn) \
values (1,'h=192.168.0.154,u=checksums,p=checksums');

3、在Master 服务器执行

1
2
3
./pt-table-checksum --user='root' --password='password' \
--databases='x25' --recursion-method dsn=h=localhost,D=percona,t=dsns \
--no-check-binlog-format --no-check-replication-filters

【原创】利用pt-table-checksum 检查主从一致 有 8,537 条回应

  1. Pretty nice post. I just stumbled upon your blog and wished to say that I have really enjoyed surfing around your blog posts.
    In any case I’ll be subscribing to your rss feed and I hope you write again soon!

    回复
  2. Do you have a spam issue on this blog; I also am a blogger,
    and I was wanting to know your situation; many of us have developed some
    nice practices and we are looking to swap solutions with others, be sure to shoot me an e-mail if interested.

    回复
  3. It’s actually very difficult in this full of activity life to listen news on Television, so I only use web for that reason, and obtain the most recent news.| а

    回复
  4. This is really interesting, You’re an excessively professional blogger.

    I’ve joined your rss feed and look forward to searching for extra of your fantastic post.
    Additionally, I’ve shared your web site in my social networks

    回复
  5. I really like what you guys are usually up too. This type of clever
    work and reporting! Keep up the wonderful works guys I’ve
    added you guys to my blogroll.

    回复
  6. We stumbled over here coming from a different page and thought I should check things out. I like what I see so i am just following you. Look forward to looking over your web page yet again.| а

    回复
  7. Heya i’m for the first time here. I found this board and I find It truly helpful & it helped me out a lot. I’m hoping to give one thing back and aid others like you aided me.| а

    回复
  8. It’s awesome to visit this website and reading the views of all colleagues on the topic of this post, while I am also eager of getting experience.| а

    回复
  9. Hi there, You have done a fantastic job. I’ll definitely digg it and personally recommend to my friends. I’m confident they will be benefited from this website.| а

    回复
  10. Useful information. Lucky me I found your web site accidentally, and I am stunned why this accident didn’t took place earlier! I bookmarked it.| а

    回复
  11. Thanks for posting this awesome article. I’m
    a long time reader but I’ve never been compelled to leave a comment.
    I subscribed to your blog and shared this on my Facebook.
    Thanks again for a great post!

    回复
  12. Very good post. I am dealing with many of these issues as well..| а

    回复
  13. That is very attention-grabbing, You are a very skilled blogger. I’ve joined your rss feed and look forward to in the hunt for extra of your wonderful post. Additionally, I have shared your site in my social networks| а

    回复
  14. I do not even know how I finished up here, but I believed this publish was once good. I don’t realize who you might be but certainly you’re going to a famous blogger if you aren’t already. Cheers!| а

    回复
  15. I seriously love your site.. Pleasant colors & theme. Did you create this web site yourself? Please reply back as I’m hoping to create my own blog and would like to know where you got this from or what the theme is named. Cheers!| а

    回复
  16. We stumbled over here by a different website and thought I may as well check things out.

    I like what I see so now i am following you. Look forward to looking over your web page repeatedly.

    回复
  17. I read this article completely regarding the comparison of newest
    and earlier technologies, it’s awesome article.

    回复
  18. Greetings! I’ve been reading your site for some time now and finally got
    the courage to go ahead and give you a shout out from Kingwood Tx!
    Just wanted to say keep up the fantastic work!

    回复
  19. Hi friends, good article and pleasant urging commented here, I am
    in fact enjoying by these.

    回复
  20. If some one desires expert view regarding blogging and site-building then i
    advise him/her to go to see this blog, Keep up the pleasant work.
    adreamoftrains content hosting

    回复
  21. I appreciate, cause I found just what I used to be taking a
    look for. You have ended my 4 day long hunt!
    God Bless you man. Have a nice day. Bye

    回复
  22. Hello mates, pleasant post and nice arguments commented
    here, I am really enjoying by these.

    回复
  23. Right away I am going away to do my breakfast, after having
    my breakfast coming over again to read further news.

    回复
  24. Definitely imagine that that you said. Your favorite justification appeared to be on the
    internet the simplest thing to understand of. I say to you, I definitely get annoyed while people consider
    issues that they just do not know about. You managed to hit the nail upon the top
    and outlined out the entire thing without having side-effects , other folks could take a signal.
    Will likely be back to get more. Thank you

    回复
  25. certainly like your website but you need to
    take a look at the spelling on quite a few of your posts.
    Many of them are rife with spelling issues and I to find
    it very troublesome to tell the reality nevertheless I’ll surely come back again.

    回复
  26. I simply want to tell you that I am just beginner to blogs and absolutely liked you’re web-site. Likely I’m want to bookmark your site . You amazingly come with fantastic stories. Kudos for sharing with us your blog site.

    回复
  27. Your way of describing everything in this piece of writing is in fact good,
    every one can easily know it, Thanks a lot.

    回复
  28. Hi there, just became aware of your blog through Google,
    and found that it is really informative.
    I am gonna watch out for brussels. I’ll be grateful if you continue this in future.
    A lot of people will be benefited from your writing.
    Cheers!

    回复
  29. Nicely put. Many thanks. [url=https://erectiledysfunctionpillsbnt.com/]pharmacy cost comparison[/url]
    [url=https://www.blogger.com/comment.g?blogID=8456546608711893889&postID=5414999381280737162&page=1&token=1593528441325&bpli=1]z31iutn q39rkv[/url] 03fc1a0

    回复
  30. [url=https://sildalistab.com/]cheap sildalis[/url] [url=https://propecia8.com/]best propecia prices[/url]

    回复
  31. whoah this blog is fantastic i really like studying your articles.
    Stay up the good work! You recognize, a lot of people are looking around for this information, you can aid
    them greatly.

    回复
  32. Anyway just wanted to say. Materials like this helps keep
    me from being gloomy and allow me to stay on track. I am hoping that
    you continue to grow, along with can discover it! Good luck and thanks
    . Anyway, I love keto so far, although I’m experimenting with trying to put my own spin. It is important to be
    flexible with your daily diet, even when you’re locked into something such
    as”keeping carbs low”. I don’t want to be the individual eating out with
    friends that orders something weird the menu, or even nothing at all off, although I would like to shed weight.

    It is just flat out not worth it if you ask me if your daily diet comes
    at the expense of your joy. That is GREAT. Been doing my best to attempt to do quality study, so stuff like this really helps.
    Anyone else believe the biggest issue people have with weight
    reduction comes from them not putting in the job ? You want to begin losing
    weight ASAP, like I get, but you must be willing to do a bit of research first.
    I’m sorry to say you are just probably going to have problems if you don’t do your part.
    xoxo

    回复
  33. Appreciate it, Loads of forum posts!
    [url=https://ntviagrausa.com/]viagra without a doctor prescription usa[/url]
    [url=http://semerarocostruzioni.it/understanding-real-world-plans-in-asiacharm/#comment-183423]a33kytm k29zvb[/url] a0ab390

    回复
  34. Hey! Do you use Twitter? I’d like to follow you if that would be okay.
    I’m undoubtedly enjoying your blog and look forward to new posts.

    回复
  35. Pretty nice post. I just stumbled upon your weblog and wished to say that I’ve
    truly enjoyed surfing around your blog posts. In any case I’ll
    be subscribing to your feed and I hope you write
    again very soon!

    回复
  36. Hi there! I could have sworn I’ve been to this web site before but after going through some of the articles I realized it’s new to me. Anyways, I’m definitely pleased I came across it and I’ll be book-marking it and checking back frequently!| а

    回复
  37. Major thanks for the blog article.Really thank you! Will read on…

    回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注