-- 8.0.19 -- Setup replication rm -rf node1/ bin/mysqld --defaults-file=./master.cnf --initialize-insecure --log-error-verbosity=3 bin/mysqld --defaults-file=./master.cnf --log-error-verbosity=3 2>&1 & rm -rf node3/ bin/mysqld --defaults-file=./slave.cnf --initialize-insecure --log-error-verbosity=3 bin/mysqld --defaults-file=./slave.cnf --log-error-verbosity=3 2>&1 & - master bin/mysql -uroot -S /tmp/mysql_master.sock --prompt='Master>' Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.19 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. Master>CREATE USER 'repl'@'localhost' IDENTIFIED BY 'slavepass'; Query OK, 0 rows affected (0.00 sec) Master>GRANT REPLICATION SLAVE ON *.* TO 'repl'@'localhost'; Query OK, 0 rows affected, 1 warning (0.00 sec) Master> Master>CREATE USER 'repl'@'127.0.0.1' IDENTIFIED BY 'slavepass'; Query OK, 0 rows affected (0.00 sec) Master>GRANT REPLICATION SLAVE ON *.* TO 'repl'@'127.0.0.1'; Query OK, 0 rows affected (0.00 sec) Master>FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) - slave bin/mysql -uroot -S /tmp/mysql_slave.sock --prompt='Slave>' Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.19 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. Slave>CHANGE MASTER TO -> MASTER_HOST='127.0.0.1', -> MASTER_PORT=8001, -> MASTER_USER='repl', -> MASTER_PASSWORD='slavepass', MASTER_AUTO_POSITION = 1, GET_MASTER_PUBLIC_KEY=1; Query OK, 0 rows affected, 2 warnings (0.01 sec) Slave>start slave; Query OK, 0 rows affected (0.11 sec) Slave>show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 Master_User: repl Master_Port: 8001 Connect_Retry: 60 Master_Log_File: mysql-bin.000002 Read_Master_Log_Pos: 1377 Relay_Log_File: mysqld-relay-bin.000002 Relay_Log_Pos: 1583 Relay_Master_Log_File: mysql-bin.000002 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: 0 Exec_Master_Log_Pos: 1377 Relay_Log_Space: 1784 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: 9adcd29d-595a-11ea-a771-0010e05f3e06 Master_Info_File: mysql.slave_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: Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: 9adcd29d-595a-11ea-a771-0010e05f3e06:1-5 Executed_Gtid_Set: 9adcd29d-595a-11ea-a771-0010e05f3e06:1-5 Auto_Position: 1 Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version: Master_public_key_path: Get_master_public_key: 1 Network_Namespace: 1 row in set (0.00 sec) -- Follow steps from report - slave Slave>set global default_storage_engine=BLACKHOLE; Query OK, 0 rows affected (0.00 sec) Slave> - master Master>create database blackhole_rpl; Query OK, 1 row affected (0.00 sec) Master>use blackhole_rpl; Database changed Master> CREATE TABLE `test` ( -> `a` int NOT NULL, -> PRIMARY KEY (`a`) -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; Query OK, 0 rows affected (0.02 sec) Master>insert into test values (1); Query OK, 1 row affected (0.01 sec) Master>update test set a=11 where a=1; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 Master> - slave (you may have to alter table engine to blackhole if it is innodb in order to repro) Slave>show slave status\G *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 127.0.0.1 Master_User: repl Master_Port: 8001 Connect_Retry: 60 Master_Log_File: mysql-bin.000002 Read_Master_Log_Pos: 3844 Relay_Log_File: mysqld-relay-bin.000002 Relay_Log_Pos: 3712 Relay_Master_Log_File: mysql-bin.000002 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: 1032 Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '9adcd29d-595a-11ea-a771-0010e05f3e06:14' at master log mysql-bin.000002, end_log_pos 3817. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any. Skip_Counter: 0 Exec_Master_Log_Pos: 3506 Relay_Log_Space: 4251 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 Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 1032 Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '9adcd29d-595a-11ea-a771-0010e05f3e06:14' at master log mysql-bin.000002, end_log_pos 3817. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any. Replicate_Ignore_Server_Ids: Master_Server_Id: 1 Master_UUID: 9adcd29d-595a-11ea-a771-0010e05f3e06 Master_Info_File: mysql.slave_master_info SQL_Delay: 0 SQL_Remaining_Delay: NULL Slave_SQL_Running_State: Master_Retry_Count: 86400 Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: 200227 13:24:04 Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: 9adcd29d-595a-11ea-a771-0010e05f3e06:1-14 Executed_Gtid_Set: 9adcd29d-595a-11ea-a771-0010e05f3e06:1-13, c5cabe49-595a-11ea-aaaf-0010e05f3e06:1 Auto_Position: 1 Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version: Master_public_key_path: Get_master_public_key: 1 Network_Namespace: 1 row in set (0.00 sec) Slave>select * from performance_schema.replication_applier_status_by_worker\G *************************** 1. row *************************** CHANNEL_NAME: WORKER_ID: 1 THREAD_ID: NULL SERVICE_STATE: OFF LAST_ERROR_NUMBER: 1032 LAST_ERROR_MESSAGE: Worker 1 failed executing transaction '9adcd29d-595a-11ea-a771-0010e05f3e06:14' at master log mysql-bin.000002, end_log_pos 3817; Could not execute Update_rows event on table blackhole_rpl.test; Can't find record in 'test', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000002, end_log_pos 3817 LAST_ERROR_TIMESTAMP: 2020-02-27 13:24:04.684777 LAST_APPLIED_TRANSACTION: 9adcd29d-595a-11ea-a771-0010e05f3e06:13 LAST_APPLIED_TRANSACTION_ORIGINAL_COMMIT_TIMESTAMP: 2020-02-27 13:24:03.719009 LAST_APPLIED_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP: 2020-02-27 13:24:03.719009 LAST_APPLIED_TRANSACTION_START_APPLY_TIMESTAMP: 2020-02-27 13:24:03.719701 LAST_APPLIED_TRANSACTION_END_APPLY_TIMESTAMP: 2020-02-27 13:24:03.720873 APPLYING_TRANSACTION: 9adcd29d-595a-11ea-a771-0010e05f3e06:14 APPLYING_TRANSACTION_ORIGINAL_COMMIT_TIMESTAMP: 2020-02-27 13:24:04.684204 APPLYING_TRANSACTION_IMMEDIATE_COMMIT_TIMESTAMP: 2020-02-27 13:24:04.684204 APPLYING_TRANSACTION_START_APPLY_TIMESTAMP: 2020-02-27 13:24:04.684622 LAST_APPLIED_TRANSACTION_RETRIES_COUNT: 0 LAST_APPLIED_TRANSACTION_LAST_TRANSIENT_ERROR_NUMBER: 0 LAST_APPLIED_TRANSACTION_LAST_TRANSIENT_ERROR_MESSAGE: LAST_APPLIED_TRANSACTION_LAST_TRANSIENT_ERROR_TIMESTAMP: 0000-00-00 00:00:00.000000 APPLYING_TRANSACTION_RETRIES_COUNT: 0 APPLYING_TRANSACTION_LAST_TRANSIENT_ERROR_NUMBER: 0 APPLYING_TRANSACTION_LAST_TRANSIENT_ERROR_MESSAGE: APPLYING_TRANSACTION_LAST_TRANSIENT_ERROR_TIMESTAMP: 0000-00-00 00:00:00.000000 - extract from slave's error log 2020-02-27T13:24:04.684790+01:00 11 [ERROR] [MY-010584] [Repl] Slave SQL for channel '': Worker 1 failed executing transaction '9adcd29d-595a-11ea-a771-0010e05f3e06:14' at master log mysql-bin.000002, end_log_pos 3817; Could not execute Update_rows event on table blackhole_rpl.test; Can't find record in 'test', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000002, end_log_pos 3817, Error_code: MY-001032 2020-02-27T13:24:04.684846+01:00 10 [Warning] [MY-010584] [Repl] Slave SQL for channel '': ... The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state. A restart should restore consistency automatically, although using non-transactional storage for data or info tables or DDL queries could lead to problems. In such cases you have to examine your data (see documentation for details). Error_code: MY-001756 2020-02-27T13:24:04.684867+01:00 10 [Note] [MY-010596] [Repl] Error reading relay log event for channel '': slave SQL thread was killed 2020-02-27T13:24:04.687178+01:00 10 [Note] [MY-010587] [Repl] Slave SQL thread for channel '' exiting, replication stopped in log 'mysql-bin.000002' at position 3506