gpt4 book ai didi

mysql - 如何在对称配置中避免从属端数据库中的 sym_ 表?

转载 作者:搜寻专家 更新时间:2023-10-30 21:45:43 25 4
gpt4 key购买 nike

我在同一个系统上运行主节点和从节点,从主节点复制到从节点,当我启动系统时,它会在主节点和从节点上生成 sym_ 表。是否真的需要以一种方式进行复制.我尝试在从端添加以下属性

auto.config.database=false

但它停止了同步本身,我在 master sym_ 表中的条目如下所示

delete from sym_trigger_router;
delete from sym_trigger;
delete from sym_router;
delete from sym_channel where channel_id in ('item');
delete from sym_node_group_link;
delete from sym_node_group;
delete from sym_node_host;
delete from sym_node_identity;
delete from sym_node_security;
delete from sym_node;



insert into sym_channel
(channel_id, processing_order, max_batch_size, enabled, description)
values('item', 1, 100000, 1, 'Item and pricing data');

insert into sym_node_group (node_group_id) values ('corp');
insert into sym_node_group (node_group_id) values ('store');

insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action) values ('corp', 'store', 'W');
insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action) values ('store', 'corp', 'P');



insert into sym_trigger
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
values('item','item','item',current_timestamp,current_timestamp);



insert into sym_router
(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time)
values('corp_2_store', 'corp', 'store', 'default',current_timestamp, current_timestamp);

insert into sym_router
(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time)
values('store_2_corp', 'store', 'corp', 'default',current_timestamp, current_timestamp);



insert into sym_trigger_router
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
values('item','corp_2_store', 100, current_timestamp, current_timestamp);



insert into sym_node (node_id,node_group_id,external_id,sync_enabled,sync_url,schema_version,symmetric_version,database_type,database_version,heartbeat_time,timezone_offset,batch_to_send_count,batch_in_error_count,created_at_node_id)
values ('000','corp','000',1,null,null,null,null,null,current_timestamp,null,0,0,'000');
insert into sym_node (node_id,node_group_id,external_id,sync_enabled,sync_url,schema_version,symmetric_version,database_type,database_version,heartbeat_time,timezone_offset,batch_to_send_count,batch_in_error_count,created_at_node_id)
values ('001','store','001',1,null,null,null,null,null,current_timestamp,null,0,0,'000');



insert into sym_node_security (node_id,node_password,registration_enabled,registration_time,initial_load_enabled,initial_load_time,created_at_node_id)
values ('000','5d1c92bbacbe2edb9e1ca5dbb0e481',0,current_timestamp,0,current_timestamp,'000');
insert into sym_node_security (node_id,node_password,registration_enabled,registration_time,initial_load_enabled,initial_load_time,created_at_node_id)
values ('001','5d1c92bbacbe2edb9e1ca5dbb0e481',1,null,1,null,'000');


insert into sym_node_identity values ('000');

如果从端不需要sym_表请帮我避免

提前致谢

最佳答案

你说的是 sym_ 而不是 sys_ 表,对吗?

是的,您需要目标节点的 sym_ 表。例如,如果没有 sym_node,您的目标节点将无法注册并保持与源节点的注册。 sym_incoming_batch 保存从目标服务器同步的所有批处理数据等。

关于mysql - 如何在对称配置中避免从属端数据库中的 sym_ 表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47471866/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com