mysql 1236

来源:互联网 发布:电脑保密软件 编辑:程序博客网 时间:2024/05/16 08:34
root@localhost [(none)]>show slave status\G*************************** 1. row ***************************               Slave_IO_State:                   Master_Host: 192.168.15.100                  Master_User: repl                  Master_Port: 3306                Connect_Retry: 60              Master_Log_File:           Read_Master_Log_Pos: 4               Relay_Log_File: relay-bin.000001                Relay_Log_Pos: 4        Relay_Master_Log_File:              Slave_IO_Running: No            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: 0          Exec_Master_Log_Pos: 0              Relay_Log_Space: 154              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: 0Master_SSL_Verify_Server_Cert: No                Last_IO_Errno: 1236                Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Slave has more GTIDs than the master has, using the master's SERVER_UUID. This may indicate that the end of the binary log was truncated or that the last binary log file was lost, e.g., after a power or disk failure when sync_binlog != 1. The master may or may not have rolled back transactions that were already replica'               Last_SQL_Errno: 0               Last_SQL_Error:   Replicate_Ignore_Server_Ids:              Master_Server_Id: 1003306                  Master_UUID: 8170836d-8e48-11e7-ac68-000c29b48f84             Master_Info_File: /data/mysql/mysql3307/data/master.info                    SQL_Delay: 0          SQL_Remaining_Delay: NULL      Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates           Master_Retry_Count: 86400                  Master_Bind:       Last_IO_Error_Timestamp: 171124 13:26:33     Last_SQL_Error_Timestamp:                Master_SSL_Crl:            Master_SSL_Crlpath:            Retrieved_Gtid_Set:             Executed_Gtid_Set: 2de86e38-913c-11e7-8254-000c29b48f84:1-4,8170836d-8e48-11e7-ac68-000c29b48f84:1-3:6-99108,8e8e9d62-9150-11e7-87df-000c29b48f84:1-1084                Auto_Position: 1         Replicate_Rewrite_DB:                  Channel_Name:            Master_TLS_Version: 1 row in set (0.00 sec)root@localhost [(none)]>2017-11-27T03:03:42.792721Z 6 [Note] Slave I/O thread: Start semi-sync replication to master 'slave@192.168.15.100:3306' in log 'FIRST' at position 42017-11-27T03:03:42.792795Z 6 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.2017-11-27T03:03:42.793723Z 6 [Note] Slave I/O thread for channel '': connected to master 'slave@192.168.15.100:3306',replication started in log 'FIRST' at position 42017-11-27T03:03:42.797032Z 6 [ERROR] Error reading packet from server for channel '': The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. (server_errno=1236)2017-11-27T03:03:42.797146Z 6 [ERROR] Slave I/O for channel '': Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.', Error_code: 12362017-11-27T03:03:42.797171Z 6 [Note] Slave I/O thread exiting for channel '', read up to log 'FIRST', position 42017-11-27T03:23:50.935266Z 9 [Note] Slave I/O thread: Start semi-sync replication to master 'slave@192.168.15.100:3306' in log 'FIRST' at position 42017-11-27T03:23:50.935333Z 9 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.2017-11-27T03:23:50.936387Z 9 [Note] Slave I/O thread for channel '': connected to master 'slave@192.168.15.100:3306',replication started in log 'FIRST' at position 42017-11-27T03:23:50.939187Z 9 [ERROR] Error reading packet from server for channel '': Slave has more GTIDs than the master has, using the master's SERVER_UUID. This may indicate that the end of the binary log was truncated or that the last binary log file was lost, e.g., after a power or disk failure when sync_binlog != 1. The master may or may not have rolled back transactions that were already replicated to the slave. Suggest to replicate any transactions that master has rolled back from slave to master, and/or commit empty transactions on master to account for transactions that have been (server_errno=1236)2017-11-27T03:23:50.939268Z 9 [ERROR] Slave I/O for channel '': Got fatal error 1236 from master when reading data from binary log: 'Slave has more GTIDs than the master has, using the master's SERVER_UUID. This may indicate that the end of the binary log was truncated or that the last binary log file was lost, e.g., after a power or disk failure when sync_binlog != 1. The master may or may not have rolled back transactions that were already replica', Error_code: 12362017-11-27T03:23:50.939283Z 9 [Note] Slave I/O thread exiting for channel '', read up to log 'FIRST', position 4这个应该是由于你在主库上执行过purge binary logs,然后当从库change master的时候,却要执行那些事务。你可以在主库上先查找哪些gtid被purge了。show global variables like 'gtid_purged';然后拿着这个value,去从库上依次stop slave;set global gtid_purged = '8170836d-8e48-11e7-ac68-000c29b48f84:1-2'; # xxx是你主库上查到的value。start slave;这样能跳过执行被主库已经purge的事务了。pt-table-checksum h=192.168.15.100,u=root,p=123456,P=3306 h=192.168.15.100,u=root,p=123456,P=3307 -d tcyangpt-table-checksum --host=192.168.15.100 --port 3306 --databases=tcyang -uroot -p123456  --no-check-binlog-format校验(Master服务器运行)pt-table-checksum --nocheck-binlog-format --nocheck-plan --nocheck-replication-filters --replicate=pt.checksums --set-vars innodb_lock_wait_timeout=120 --databases newtable -u'checksums' -p'checksums' -h10.1.1.6