Mysql Replication out of sync? What commands do I run to sync it back up?
- by Alex
I have a master-master replication system.
However, due to an auto-increment issue, I got an error in replication...and it stopped replicating.
Someone told me to do:
stop slave; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; start slave;
It didn't work. Then they told me to do:
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2;
It didn't work. Then to test it out, I did:
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 99999;
It starts, but it is not updating. I created a table on DB1...and it is not showing up on DB2...
Below are the SHOW STATUS for both my DB1 and DB2 (I hit them together):
mysql> show master status\G
*************************** 1. row ***************************
File: mysql-bin.000605
Position: 2019727
Binlog_Do_DB:
Binlog_Ignore_DB:
1 row in set (0.00 sec)
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host:
Master_User:
Master_Port:
Connect_Retry: 60
Master_Log_File: mysql-bin.000605
Read_Master_Log_Pos: 2008810
Relay_Log_File: mysqld-relay-bin.001731
Relay_Log_Pos: 10176595
Relay_Master_Log_File: mysql-bin.000470
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 4255373725
Exec_Master_Log_Pos: 10176458
Relay_Log_Space: 135062517347
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: 1376343
1 row in set (0.00 sec)
How do I fix it so that they sync back up again?
Thank you.