| dump/reload in master-master [message #2935] |
Fri, 11 April 2008 18:00  |
Jjhuff Messages: 5 Registered: October 2007 |
Junior Member |
|
|
It looks like I have some InnoDB corruption on one of my masters in a master-master configuration. My thought was to dump, drop, and reload the data on that server.
What's the best way to do that without messing up the other master?
My thoughts where to:
A = active master, no getting reloaded
B = passive master, getting dumped/reloaded
0. stop slave on B
1. stop slave on A
2. Disable bin_log on the B
3. mysqldump the two databases on B
4. Drop them on B
5. reload them on B
6. Reenable bin_log
7. start slave on A
Is there an easier way?
thanks!
|
|
|
|
|
| Re: dump/reload in master-master [message #2953 is a reply to message #2949 ] |
Tue, 15 April 2008 00:07  |
debug Messages: 132 Registered: March 2008 |
Senior Member |

|
|
At first please verify data with mk-table-checksum. It will show if number of records or checksums are different.
After that you can continue using two possible ways:
1) Manually fix the problem (do not forget to do "SET SQL_LOG_BIN=0" before doing any changes, if you do not want them to be replicated to another server. See http://dev.mysql.com/doc/refman/5.0/en/binary-log.html for details about disabling binlog). When you have fixed tables, check them again with mk-table-checksum.
2) Use mk-table-sync for fixing tables. Please read docs carefully, and pay special attention that you also should disable writing to binary log (using --skipbinlog option).
Mikhail Solovyev, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
|
|
|