GRANT FILE ON *.* TO backup@'10.10.10.53' IDENTIFIED BY ‘1234’
create database backup
GRANT FILE ON *.* TO backup@'10.10.10.22' IDENTIFIED BY ‘1234’
server-id=1log-bin#设置需要记录log 可以设置log-bin=c:mysqlbakmysqllog 设置日志文件的目录,#其中mysqllog是日志文件的名称,mysql将建立不同扩展名,文件名为mysqllog的几个日志文件。binlog-do-db=backup #指定需要日志的数据库
server-id=2master-host=10.10.10.22master-user=backup #同步用户帐号master-password=1234master-port=3306master-connect-retry=60 预设重试间隔60秒replicate-do-db=backup 告诉slave只做backup数据库的更新
master-host=10.10.10.53master-user=backupmaster-password=1234replicate-do-db=backupmaster-connect-retry=10
log-bin=c:mysqllogmysqllogbinlog-do-db=backup