配置好了主从数据库,日志也没报什么错。 当主库发生改变后(修改,删除),
 主 show master status \G
 从 show slave status \G主库和从库的日志文件,位置Position,都会发生改变。但问题是,从库的数据并没有改变。主库中删除的数据还在。
是什么问题?

解决方案 »

  1.   

    你肯定看错了,如果show slave status没报错的话 或者没有延迟的话
      

  2.   

    Slave_IO_State: Waiting for master to send event
                      Master_Host: xxxx
                      Master_User: xxxx
                      Master_Port: 3306
                    Connect_Retry: 60
                  Master_Log_File: mysql-bin.000013
              Read_Master_Log_Pos: 48183
                   Relay_Log_File: database-relay-bin.000001
                    Relay_Log_Pos: 4
            Relay_Master_Log_File: 
                 Slave_IO_Running: Yes
                Slave_SQL_Running: Yes
                  Replicate_Do_DB: xxxxxx
              Replicate_Ignore_DB: 
               Replicate_Do_Table: 
           Replicate_Ignore_Table: 
          Replicate_Wild_Do_Table: 
      Replicate_Wild_Ignore_Table: 
                       Last_Errno: 0
                       Last_Error: 
                     Skip_Counter: 0
              Exec_Master_Log_Pos: 0
                  Relay_Log_Space: 213156705
                  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: 0
    Master_SSL_Verify_Server_Cert: No
                    Last_IO_Errno: 0
                    Last_IO_Error: 
                   Last_SQL_Errno: 0
                   Last_SQL_Error: 
    1 row in set (0.00 sec)
    不知道哪不对?日志也没报错.
      

  3.   

    show master status \G*************************** 1. row ***************************
                File: mysql-bin.000013
            Position: 48183
        Binlog_Do_DB: xxxxxx
    Binlog_Ignore_DB: mysql
    1 row in set (0.00 sec)
      

  4.   

    解决了,谁能给解释下。
    之前,slave stop;slave start;都不能同步reset slave;用这个,居然好了。
      

  5.   

    RESET SLAVE
    用于让从属服务器忘记其在主服务器的二进制日志中的复制位置。本语句被用于进行一个明确的启动:它会删除master.info和relay-log.info文件,以及所有的中继日志,并启动一个新的中继日志。注释:所有的中继日志被删除,即使它们没有被从属服务器SQL线程完全的执行。(如果您已经发布了一个SLAVE语句或如果从属服务器的载入量很大,则这对于一个复制从属服务器是一个很可能出现的情况。)存储在master.info文件中的连接信息通过使用在对应的启动选项中指定的值,被立即重新设置了。此信息包括主服务器主机、主服务器接口、主服务器用户和主服务器 密码等值。当从属服务器SQL线程被中止时,它位于正在复制的临时表的中间,并且发布了RESET SLAVE,则已被复制的临时表在从属服务器中被删除。