解决方案 »

  1.   

                   Slave_IO_State: Waiting for master to send event
                      Master_Host: 10.32.240.116
                      Master_User: repl
                      Master_Port: 3306
                    Connect_Retry: 60
                  Master_Log_File: mysql-bin.000039
              Read_Master_Log_Pos: 44716
                   Relay_Log_File: mysql-relay-bin.000009
                    Relay_Log_Pos: 44879
            Relay_Master_Log_File: mysql-bin.000039
                 Slave_IO_Running: Yes
                Slave_SQL_Running: Yes
                  Replicate_Do_DB: gr5on_pc_lt_b_logs
              Replicate_Ignore_DB:
               Replicate_Do_Table:
           Replicate_Ignore_Table:
          Replicate_Wild_Do_Table: gr5on_pc_lt_b_logs.*
      Replicate_Wild_Ignore_Table:
                       Last_Errno: 0
                       Last_Error:
                     Skip_Counter: 0
              Exec_Master_Log_Pos: 44716
                  Relay_Log_Space: 45215
                  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:
      Replicate_Ignore_Server_Ids:
                 Master_Server_Id: 1
                      Master_UUID: 5c13cbe8-88ba-11e3-be70-005056995d19
                 Master_Info_File: /opt/mysql/master.info
                        SQL_Delay: 0
              SQL_Remaining_Delay: NULL
          Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
               Master_Retry_Count: 86400
                      Master_Bind:
          Last_IO_Error_Timestamp:
         Last_SQL_Error_Timestamp:
                   Master_SSL_Crl:
               Master_SSL_Crlpath:
               Retrieved_Gtid_Set:
                Executed_Gtid_Set:
                    Auto_Position: 0
    1 row in set (0.00 sec)ERROR:
    No query specifiedmysql> show slave status\G;
    *************************** 1. row ***************************
                   Slave_IO_State: Waiting for master to send event
                      Master_Host: 10.32.240.116
                      Master_User: repl
                      Master_Port: 3306
                    Connect_Retry: 60
                  Master_Log_File: mysql-bin.000039
              Read_Master_Log_Pos: 104979
                   Relay_Log_File: mysql-relay-bin.000009
                    Relay_Log_Pos: 105142
            Relay_Master_Log_File: mysql-bin.000039
                 Slave_IO_Running: Yes
                Slave_SQL_Running: Yes
                  Replicate_Do_DB: gr5on_pc_lt_b_logs
              Replicate_Ignore_DB:
               Replicate_Do_Table:
           Replicate_Ignore_Table:
          Replicate_Wild_Do_Table: gr5on_pc_lt_b_logs.*
      Replicate_Wild_Ignore_Table:
                       Last_Errno: 0
                       Last_Error:
                     Skip_Counter: 0
              Exec_Master_Log_Pos: 104979
                  Relay_Log_Space: 105478
                  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:
      Replicate_Ignore_Server_Ids:
                 Master_Server_Id: 1
                      Master_UUID: 5c13cbe8-88ba-11e3-be70-005056995d19
                 Master_Info_File: /opt/mysql/master.info
                        SQL_Delay: 0
              SQL_Remaining_Delay: NULL
          Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
               Master_Retry_Count: 86400
                      Master_Bind:
          Last_IO_Error_Timestamp:
         Last_SQL_Error_Timestamp:
                   Master_SSL_Crl:
               Master_SSL_Crlpath:
               Retrieved_Gtid_Set:
                Executed_Gtid_Set:
                    Auto_Position: 0
      

  2.   

    1.master 上检查slave:
    mysql> show slave hosts;
    +-----------+---------------+------+-----------+--------------------------------------+
    | Server_id | Host          | Port | Master_id | Slave_UUID                           |
    +-----------+---------------+------+-----------+--------------------------------------+
    |         2 | 10.32.240.117 | 3306 |         1 | 421962B3-C22B-DC90-346E-F14894C42980 |
    +-----------+---------------+------+-----------+--------------------------------------+
    2.master上检查processlist
    | 59 | repl   | 10.32.240.117:47617 | NULL               | Binlog Dump |  264 | Master has sent all binlog to slave; waiting for binlog to be updated | NULL             |         0 |             0 |
    3.master上检查状态
    mysql> show master status;
    +------------------+----------+--------------------+------------------+--------------------------------------------+
    | File             | Position | Binlog_Do_DB       | Binlog_Ignore_DB | Executed_Gtid_Set                          |
    +------------------+----------+--------------------+------------------+--------------------------------------------+
    | mysql-bin.000041 |   530697 | gr5on_pc_lt_b_logs |                  | 5c13cbe8-88ba-11e3-be70-005056995d19:1-297 |
    +------------------+----------+--------------------+------------------+--------------------------------------------+
    4.slave上检查processlist
    mysql> show processlist;
    +----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+------------------+-----------+---------------+
    | Id | User        | Host      | db   | Command | Time | State                                                                       | Info             | Rows_sent | Rows_examined |
    +----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+------------------+-----------+---------------+
    |  1 | system user |           | NULL | Connect |  683 | Waiting for master to send event                                            | NULL             |         0 |             0 |
    |  2 | system user |           | NULL | Connect |    2 | Slave has read all relay log; waiting for the slave I/O thread to update it | NULL             |         0 |             0 |
    |  3 | system user |           | NULL | Connect |  683 | Waiting for an event from Coordinator                                       | NULL             |         0 |             0 |
    |  4 | system user |           | NULL | Connect |    0 | Waiting for an event from Coordinator                                       | NULL             |         0 |             0 |
    |  5 | root        | localhost | NULL | Query   |    0 | init                                                                        | show processlist |         0 |             0 |
    +----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+------------------+-----------+---------------+
    5.检查slave运行状态
                   Slave_IO_State: Waiting for master to send event
                      Master_Host: 10.32.240.116
                      Master_User: repl
                      Master_Port: 3306
                    Connect_Retry: 60
                  Master_Log_File: mysql-bin.000041
              Read_Master_Log_Pos: 530697
                   Relay_Log_File: mysql-relay-bin.000008
                    Relay_Log_Pos: 288657
            Relay_Master_Log_File: mysql-bin.000041
                 Slave_IO_Running: Yes
                Slave_SQL_Running: Yes
                  Replicate_Do_DB: gr5on_pc_lt_b_logs
              Replicate_Ignore_DB: mysql
               Replicate_Do_Table:
           Replicate_Ignore_Table:
          Replicate_Wild_Do_Table: gr5on_pc_lt_b_logs.*
      Replicate_Wild_Ignore_Table:
                       Last_Errno: 0
                       Last_Error:
                     Skip_Counter: 0
              Exec_Master_Log_Pos: 530697
                  Relay_Log_Space: 372744
                  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:
      Replicate_Ignore_Server_Ids:
                 Master_Server_Id: 1
                      Master_UUID: 5c13cbe8-88ba-11e3-be70-005056995d19
                 Master_Info_File: /opt/mysql/master.info
                        SQL_Delay: 0
              SQL_Remaining_Delay: NULL
          Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
               Master_Retry_Count: 86400
                      Master_Bind:
          Last_IO_Error_Timestamp:
         Last_SQL_Error_Timestamp:
                   Master_SSL_Crl:
               Master_SSL_Crlpath:
               Retrieved_Gtid_Set: 5c13cbe8-88ba-11e3-be70-005056995d19:7-297
                Executed_Gtid_Set: 5c13cbe8-88ba-11e3-be70-005056995d19:1-297
                    Auto_Position: 0检查下来全部都是没有问题的,但是数据就是不变化。
    我在slave上开启general_log,也没有生成这个文件。
    请教这样的情况该如何搞?谢谢。
      

  3.   

    解决,一个符号错了:Replicate_Wild_Do_Table: gr5on_pc_lt_b_logs.*
    应该是Replicate_Wild_Do_Table: gr5on_pc_lt_b_logs.%