My system administrator set up 2 databases that sync. Master-Master. However, these two databases a

Posted by Alex on Server Fault See other posts from Server Fault or by Alex
Published on 2009-12-04T22:21:15Z Indexed on 2010/03/09 7:08 UTC
Read the original article Hit count: 292

Filed under:
|
|
|
|

DB1 and DB2.

I made changes to DB1, and it does not seem to be on DB2. When I do "SHOW SLAVE STATUS\G" on DB2, there seems to be an error:

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.0005496
        Read_Master_Log_Pos: 5445649315
             Relay_Log_File: mysqld-relay-bin.0041705
              Relay_Log_Pos: 1624302119
      Relay_Master_Log_File: mysql-bin.0004461
           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: 1062
                 Last_Error: Error 'Duplicate entry '4779' for key 1' on query. Default database: 'falc'. Query: 'INSERT INTO `log` (`anon_id`, `created_at`, `query`, `episode_url`, `detail_id`, `ip`) VALUES ('fdzn1d45kMavF4qbyePv', '2009-11-19 04:19:13', 'amazon', '', '', '130.126.40.57')'
               Skip_Counter: 0
        Exec_Master_Log_Pos: 162301982
            Relay_Log_Space: 136505187184
            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
1 row in set (0.00 sec)

Then, I did show tables, and it seems like DB2 is lacking a table that I created on DB1...that means that for some reason, DB2 stopped syncing with DB1.

How can I simply allow them to be in full synchronization again?

All I want is DB2 to be exactly the same as DB1!

© Server Fault or respective owner

Related posts about mysql

Related posts about database