Properly Re-starting replication process

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I've just tried to re-start a replication process and the slave's
tables came up marked as crashed. I'm doing a repair on one of them but
there are a lot of databases/tables so I can't check them all (or is
there a table entry somewhere that flags crashed tables?) Here is the
sequence I used:

On Slave (FreeBSD-6.0):
Stop slave using stop slave
show slave status (slave process and IO are not running). Note bin-log
position and heck it against It agrees.
Stop mysqld using  /usr/local/etc/rc.d/ stop

On Master (Ubuntu-hoary):
show master status.
stop master using /etc/init.d/mysql stop

Installworld and installkernel on slave.
mergemaster magic
Reboot slave

Start Master using /etc/init.d/mysql start. Verify it's running.
Start slave using /usr/local/etc/rc.d/ start. Verify
it's running.
Start slave using start slave
login to mysql
use <DB of choice>
select count(*) from blah
'error table marked as crashed and failed auto (something-or-other)'
did repair table blah
select count(*) from blah
big number returned and it's correct.

I've poked around (and will continue) but haven't yet found a recipe
for this re-start sequence. Is there one?



Site Timeline