Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: dm 上游数据库如何从从库取
Upstream database: MySQL
Upstream database slave mode: binlog, one master multiple slaves
The following implementation is feasible:
The downstream master synchronizes data from the upstream slave. Is this mode feasible? How to configure it?
My DM task configuration file for creating the data source is as follows:
Solved, the slave needs to enable the log_slave_updates parameter.
The configuration is the same whether it’s from the replica or the primary database; just bind to different data sources. Binding to the replica will cause greater data latency and may lead to data consistency issues.
Just configure it as if it were the primary database, paying attention to latency issues.
However, the binlog of the replica is not increasing, how to retrieve it?
But the binlog of the replica has not been increasing, how to retrieve it?
However, the binlog of the replica has not been increasing.
Generally, if binlog is enabled, it will increment normally. If there is an issue, then you need to check for problems with MySQL.
- I checked the binlog logs, and there were no updates at all.
Is it that the slave did not write the synchronized data from the master to the local binlog? Have you set the log_slave_updates variable? Only by setting this variable will the slave write the synchronized changes to its own binlog.
FYI: https://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html#sysvar_log_slave_updates
As for DM, it does not care whether the database it is synchronizing is a slave or not; as long as there is a binlog, it can perform synchronization.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.