This is an old revision of the document!


MySQL replication

 mysql> SHOW SLAVE STATUS \G
 ...
 Replicate_Wild_Ignore_Table:
                  Last_Errno: 1146
                  Last_Error: Error 'Table 'mydb.taggregate_temp_1212047760' doesn't exist' on query. Default database: 'mydb'. 
  Query: 'UPDATE thread AS thread,taggregate_temp_1212047760 AS aggregate
         SET thread.views = thread.views + aggregate.views
         WHERE thread.threadid = aggregate.threadid'
 ...
 mysql> STOP SLAVE;
 mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;

This tells the slave to skip one query (which is the invalid one that caused the replication to stop). If you'd like to skip two queries, you'd use SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2; instead and so on.

 mysql> START SLAVE;
 mysql> SHOW SLAVE STATUS \G

Master + Slave

Master Master

see this

mysql/replication.1212921499.txt.gz · Last modified: 2009/05/25 00:34 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready