Description:
Description:
mysql service run the 5.7.27 version,Master-slave synchronization
add configuration /etc/my.conf
replicate-wild-do-table=ios_logs.money_change_%,ios_logs.item_change_%
/etc/init.d/mysqld restart
How to repeat:
[root@localhost][(none)]> SHOW slave status \G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.11
Master_User: copy
Master_Port: 3306
Connect_Retry: 10
Master_Log_File: mysql-bin.000016
Read_Master_Log_Pos: 4807
Relay_Log_File: relay.000003
Relay_Log_Pos: 941
Relay_Master_Log_File: mysql-bin.000016
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB: mysql
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table: ios_logs.money_change_%,ios_logs.item_change_%
The mongey_change table is not synchronized,
Master:
[root@localhost][ios_logs]>insert into money_change_20191103 values(null,'2018-01-06 23:59:51',108,'a','000108_148566392','20050000385637',5,'ad',16,0,33,25,1,1,5,1);
Query OK, 1 row affected (0.00 sec)
[root@localhost][ios_logs]>insert into money_change_20191103 values(null,'2018-01-06 23:59:51',108,'a','000108_148566392','20050000385637',5,'ad',16,0,33,25,1,1,5,1);
Query OK, 1 row affected (0.00 sec)
[root@localhost][ios_logs]>insert into money_change_20191103 values(null,'2018-01-06 23:59:51',108,'a','000108_148566392','20050000385637',5,'ad',16,0,33,25,1,1,5,1);
Query OK, 1 row affected (0.00 sec)
slave server:
root@localhost][ios_logs]>select * from money_change_20191103;
Empty set (0.00 sec)
[root@localhost][ios_logs]>
Slave server logerror repeat
2019-11-18T17:25:16.171278+08:00 21 [Note] Slave SQL for channel '': Worker 1 failed executing transaction 'ANONYMOUS' at master log mysql-bin.000016, end_log_pos 4973; Could not execute Query event. Detailed error: Slave SQL thread ignored the query because of replicate-*-table rules; Error log throttle is enabled. This error will not be displayed for next 60 secs. It will be suppressed, Error_code: 1237