1 主库db的更新事件(update、insert、delete)被写到binlog 2 主库创建一个binlog dump thread,把binlog的内容发送到从库 3 从库启动并发起连接,连接到主库 4 从库启动之后,创建一个I/O线程,读取主库传过来的binlog内容并写入到relay log 5 从库启动之后,创建一个SQL线程,从relay log里面读取内容,从 6 Exec_Master_Log_Pos位置开始执行读取到的更新事件,将更新内容写入到slave的db
转载请注明原文地址:https://blackberry.8miu.com/read-7106.html