Home > database >  Starting from the current data master-slave synchronization
Starting from the current data master-slave synchronization

Time:09-22

Mysql master-slave replication, excuse me I do not production database backup, don't need, before the old data, from the current data synchronization, is feasible?

CodePudding user response:

Insert into t2
Select
*
The from t2
Where the date=new

CodePudding user response:

Can try mysql own table synchronization mechanism, this is the first library building table script, the original table and backup table, in the different database, but shall be the same structure,
The CREATE TABLE ` TABLE name ` (
` field... ,
PRIMARY KEY (` PRIMARY KEY field `)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 CONNECTION='mysql://backup database user name: password database backup @ backup database IP: port/backup database backup database name/backup database table name';

CodePudding user response:

Can use the database synchronization tool DBSync, support a variety of database, the synchronization between the Settings page, use the select statement limit participation in sync source range, rule out the old data, as shown in the figure below:
  • Related