时间:2021-07-01 10:21:17 帮助过:4人阅读
[mysql@db2 ~]$ diff master2.sql master1.sql 22c22 < -- CHANGE MASTER TO MASTER_LOG_FILE=‘mysql-bin2.000001‘, MASTER_LOG_POS=259; --- > CHANGE MASTER TO MASTER_LOG_FILE=‘mysql-bin2.000001‘, MASTER_LOG_POS=335; 845c845 < -- Dump completed on 2012-03-13 18:09:46 --- > -- Dump completed on 2012-03-13 18:10:17
[mysql@db2 ~]$ diff slave2.sql slave1.sql 22c22 < -- CHANGE MASTER TO MASTER_LOG_FILE=‘mysql-bin.000007‘, MASTER_LOG_POS=107; --- > CHANGE MASTER TO MASTER_LOG_FILE=‘mysql-bin.000007‘, MASTER_LOG_POS=107; 845c845 < -- Dump completed on 2012-03-13 18:09:59 --- > -- Dump completed on 2012-03-13 18:10:24
有上可知:
这个不但可以用于建立slave,还可用于备份中,用于读binlog进行roll forward的起点
注意:
--master-data, It turns on --lock-all-tables, unless single-transaction also is specified
mysqldump中master-data和dump-slave的区别
标签: