-- 5.7.29 (use reporter conf but comment out mysql_x* and binlog_expire_logs_seconds etc) -- 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 2 Server version: 5.7.29-log 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.01 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.01 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 2 Server version: 5.7.29-log 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; Query OK, 0 rows affected, 2 warnings (0.01 sec) Slave>start slave; Query OK, 0 rows affected (0.09 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: 1176 Relay_Log_File: mysqld-relay-bin.000002 Relay_Log_Pos: 1381 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: 1176 Relay_Log_Space: 1581 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: 6630c58b-5dd6-11ea-8fd1-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: 6630c58b-5dd6-11ea-8fd1-0010e05f3e06:1-5 Executed_Gtid_Set: 6630c58b-5dd6-11ea-8fd1-0010e05f3e06:1-5 Auto_Position: 1 Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version: 1 row in set (0.00 sec) Slave>set global default_storage_engine=BLACKHOLE; Query OK, 0 rows affected (0.00 sec) - 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; ERROR 1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci' Master>CREATE TABLE `test` ( `a` int NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; Query OK, 0 rows affected (0.00 sec) - slave Slave>use blackhole_rpl; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed Slave>show create table test\G *************************** 1. row *************************** Table: test Create Table: CREATE TABLE `test` ( `a` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 1 row in set (0.00 sec) Slave>alter table test engine=blackhole; Query OK, 0 rows affected (0.00 sec) Records: 0 Duplicates: 0 Warnings: 0 Slave>show create table test\G *************************** 1. row *************************** Table: test Create Table: CREATE TABLE `test` ( `a` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=BLACKHOLE DEFAULT CHARSET=utf8mb4 1 row in set (0.01 sec) - master 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 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: 2213 Relay_Log_File: mysqld-relay-bin.000002 Relay_Log_Pos: 2109 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 '6630c58b-5dd6-11ea-8fd1-0010e05f3e06:9' at master log mysql-bin.000002, end_log_pos 2186. 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: 1904 Relay_Log_Space: 2618 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 '6630c58b-5dd6-11ea-8fd1-0010e05f3e06:9' at master log mysql-bin.000002, end_log_pos 2186. 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: 6630c58b-5dd6-11ea-8fd1-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: 200304 06:16:06 Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: 6630c58b-5dd6-11ea-8fd1-0010e05f3e06:1-9 Executed_Gtid_Set: 6630c58b-5dd6-11ea-8fd1-0010e05f3e06:1-8, 981ca5b9-5dd6-11ea-9593-0010e05f3e06:1 Auto_Position: 1 Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version: 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_SEEN_TRANSACTION: 6630c58b-5dd6-11ea-8fd1-0010e05f3e06:9 LAST_ERROR_NUMBER: 1032 LAST_ERROR_MESSAGE: Worker 1 failed executing transaction '6630c58b-5dd6-11ea-8fd1-0010e05f3e06:9' at master log mysql-bin.000002, end_log_pos 2186; Could not execute Update_rows event on table blackhole_rpl.test; Can't find record in 'test', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log mysql-bin.000002, end_log_pos 2186 LAST_ERROR_TIMESTAMP: 2020-03-04 06:16:06