5 月 072014
 

MySQL Utilities的应用

授权

grant select on shanliao1.* to ‘test’@’192.168.0.76’ identified by ‘test910418’;
grant select on shanliao2.* to ‘test’@’192.168.0.76’ identified by ‘test910418’;

grant select  on  mysql.proc  to ‘test’@’192.168.0.76’ identified by ‘test910418’;
grant select  on  mysql.event  to ‘test’@’192.168.0.76’ identified by ‘test910418’;

flush privileges;

比对命令这里–skip-data-check 取消了数据比较,指对比表结构。

mysqldbcompare –server1=test:test910418@192.166.126.162:13306 –server2=test:test910418@192.21.28.139   -a shanliao1:shanliao1 –skip-data-check

mysqldbcompare 安装的话很简单,centos6的话,安装epel源,然后直接yum -y install mysql-utilities即可

其实还有个更详细的比对工具:mysqldiff不过这注重比对表,所以不符合需求。

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny