数据同步脚本
1 mysqldump -h[remoteHost] -u[username] -p[password] -P[port] --databases [databasename1] [databasename2] > DB_MKT_2020-06-29.sql
2 echo "备份完成";
3 mysql -u[root] -p[123456] -h[localhost]
4 echo "导入完成";
5 PAUSE
主从配置时报错处理
Could not execute Update_rows event on table DB_CFG.QRTZ_FIRED_TRIGGERS; Can't find record in 'QRTZ_FIRED_TRIGGERS', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql_bin.000052, end_log_pos 362889117
找到DB_CFG库QRTZ_FIRED_TRIGGERS表,同步两个数据的数据即可