> I posted this on the Replication list, but have received no reply, so I
> figured I'd try here.
> When the databases get out of sync during replication, what is the best way
> to re-sync them on a Windows system? The only way I know of right now is to
> do it late at night, and pray that no one gets in while you're doing it.
> Stop the slave, do a backup (using MySQL Administrator, or mysqldump), note
> the log position on the master, restore the data on the slave, change the
> log position on the slave, then re-start the slave. Is this the best way to
> do it?
> My issue has always been that I need the master MySQL running all the time.
> I might be able to stop it for a minute or two, and I'm sure that'll
> generate errors, but what can I do. But, in order to run a backup, it needs
> to be running. I've tried the "copy the physical files" thing, and that has
> never worked for me. Don't know why, but it doesn't.
Yeah, copying the physical files is fraught with danger. In general,
any change you make to the slave directly is circumventing replication
and could cause data to get out of sync silently, or even cause
replication to break badly.
The solution (in my opinion) is to do the re-sync *through replication*.
Check out the mysql-table-checksum and mysql-table-sync tools in the
MySQL Toolkit (http://mysqltoolkit.sourceforge.net/). There's a how-to
in the latest MySQL Magazine (http://www.paragon-cs.com/mag/index.html).