MySQL延迟同步

目的是 防止主库的误操作造成从库也被误操作。
mysql>stop slave;
mysql>CHANGE MASTER TO MASTER_DELAY = 1800;单位为秒
mysql>start slave;
mysql>show slave status \G;?
如下图所示: 红色框中参数的意义:
在这里插入图片描述
Master_Log_File 主库mysql的binlog文件名
Read_Master_Log_Pos 读取主库mysql的binlog文件的位置
Exec_Master_Log_Pos 从库执行主库mysql的binlog文件的位置
Seconds_Behind_Master 从库延迟主库同步的时间单位秒
SQL_Delay 设置从库服务器相较于主库服务器的延迟同步时间

猜你喜欢

转载自blog.csdn.net/bjgaocp/article/details/88132993