Master Master replication questions and problems
I set up a master master replication as explained by falko how-to.
It works but I ran in some problems.
Let say there is a replication between server1 and server2 (master-master)
1)If server1 reboot, will it resync automatically with server2 upon restart?
From what Ive seen, it doesnt seem to resync automatically but maybe I did something wrong.
Everytime I reboot a machine I have to :
because log position is not the same...
on both machines and then find tables that are not in sync with maatkit :
#mk-table-checksum h=server1,u=root,p=pass h=server2,u=root,p=pass | mk-checksum-filter
and resync tables - in this example table1 on db1 (on server1 that rebooted):
mk-table-sync --synctomaster --execute h=localhost,u=root,p=pass,D=db1,t=table1
2)My second question is about replication in general. Again I will suppose that server1 rebooted.
If I do (on server1)
show slave status;
I will get a "Read_Master_Log_Pos:" that does not match the output of "Position" :
(on server 2)
show master status;
Will the replication still work??? I mean, is it necessary to do stop slave, reset master, reset slave, start slave on both to restart the replication?
Any help would be greatly appreciated