Repair Slave MySQL Replication – Table Doesn’t Exist

Show Slave Status\G

MariaDB [(none)]> Show Slave Status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 52.74.203.216
Master_User: tdp
Master_Port: 20000
Connect_Retry: 60
Master_Log_File: master-bin.000030
Read_Master_Log_Pos: 1940465
Relay_Log_File: mysql-relay-bin.000002
Relay_Log_Pos: 242882773
Relay_Master_Log_File: master-bin.000028
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1146
Last_Error: Error ‘Table ‘DAY1_Log.UserPool02′ doesn’t exist’ on query. Default database: ‘DAY1_Log’. Query: ‘CREATE INDEX IX_UserPool02 ON UserPool02 (UID, `Date`)’
Skip_Counter: 0
Exec_Master_Log_Pos: 242882603
Relay_Log_Space: 780312961
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_SSL_Crl:
Master_SSL_Crlpath:
Using_Gtid: No
Gtid_IO_Pos:
Replicate_Do_Domain_Ids:
Replicate_Ignore_Domain_Ids:
Parallel_Mode: conservative

mysql> STOP SLAVE;

mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;

mysql> START SLAVE;

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.

02

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> SHOW SLAVE STATUS \G

 

Source: https://www.howtoforge.com/how-to-repair-mysql-replication

 

One thought on “Repair Slave MySQL Replication – Table Doesn’t Exist

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.