# master master setup

**URL:** <https://forums.percona.com/t/master-master-setup/1822>\
**Category:** Other MySQL® Questions\
**Created:** [June 6, 2012, 6:01am UTC](https://forums.percona.com/t/master-master-setup/1822 "2012-06-06T06:01:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjh5598](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@mjh5598](https://forums.percona.com/u/mjh5598)\
**Post date:** [June 6, 2012, 6:01am UTC](https://forums.percona.com/t/master-master-setup/1822/1 "2012-06-06T06:01:05Z")

</div>

I have seen the tutorial regarding master slave mysql setup - but can anyone assist in pointing me to a setup on how to get master master setup functioning - with a sync utility between servers if the servers go out of sync and i wish to use my functioning server to sync to the out of sync server ?

thanks

---

<div class="post-metadata">

**Author:** ![federated\_life](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@federated\_life](https://forums.percona.com/u/federated_life)\
**Post date:** [June 6, 2012, 12:40pm UTC](https://forums.percona.com/t/master-master-setup/1822/2 "2012-06-06T12:40:58Z")

</div>

check out pt-table-checksum and pt-table-sync to check for and maintain consistency. If you have a lot of data, you’ll have to throttle checksum’n.

useful options Ive found is with pt-table-sync, the print and test options. There’s also a detailed section about master-master.

for pt-table-sync, you’ll have to query the checksum tables to see where checksum’s do not match

---

<div class="post-metadata">

**Author:** ![mjh5598](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@mjh5598](https://forums.percona.com/u/mjh5598)\
**Post date:** [June 6, 2012, 2:19pm UTC](https://forums.percona.com/t/master-master-setup/1822/3 "2012-06-06T14:19:11Z")

</div>

thanks - but do you know where there is a tutorial on how to run those utilities ?  
I have downloaded them and getting an error.

I have entered the the username/password for master1 as m1/pas and for master2 as m2/pas in the [client] sections of both my.cnf files.

I get this error:

pt-table-sync --execute h=192.168.62.25,D=mailserver,t=virtual\_users h=192.168.62.121  
DBI connect(‘mailserver;host=192.168.62.25;mysql\_read\_default\_gr oup=client’,‘’,…) failed: Access denied for user ‘m1’&#64;‘bbmachine.local’ (using password: YES) at /usr/bin/pt-table-sync line 1382

I think my issuse is for some reason it adds the ‘bbmachine.local’ ending to the name - do not know how to stop this. Further - i do not think it should matter because i have ‘m1’@‘%’ – so that user can login from anywhere - I did not really give the user any further rights then the article - [URL][http://www.howtoforge.com/mysql\_master\_master\_replication[/URL]](http://www.howtoforge.com/mysql_master_master_replication%5B/URL%5D) - gave the user.

thanks – any tutorial you can point me to would be appriciated.
