The application provides a
database replication method and
system, the method comprises the following steps: responding to a binary change log and performing analysis, extracting an initial log source sequence number, a
timestamp and an associated partition identifier, and then obtaining a
database partition preset sequence number; if the two sequence numbers are not continuous, the
timestamp is valid, and the initial log source sequence number satisfies a preset first condition, a new independent
numerical range is created and a target missing sequence number interval is identified; a data generation log supplement
signal is generated based on the above data and sent to a producer cluster, so that the producer cluster feeds back a missing sequence log; based on the independent
numerical range and the
database partition preset sequence number, a database partition first sequence number is obtained, and the replication of the database is completed. The database
replication method provided by the application avoids the problems of repeated data
insertion and missing log omission supplement, realizes efficient consistent replication of the database, and guarantees the stability and reliability of the database replication in a multi-cluster
scenario.