为什么建议在 MySQL 中使用 --skip-slave-start `START SLAVE UNTIL`?

为什么建议在 MySQL 中使用 --skip-slave-start `START SLAVE UNTIL`?

在 MySQL 上发布时START SLAVE UNTIL,我收到以下信息:

Warning: It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart.

为什么建议使用它--skip-slave-start?如果从服务器确实重新启动,会发生什么情况 - 它是否只会忘记UNTIL部分并复制到 binlog 末尾?

答案1

它是否只忘记 UNTIL 部分并复制到 binlog 末尾?

这是正确的。

如果之前配置的从属服务器在启动时没有使用--skip-slave-start,那么它将使用 中存储的信息master.info自动重新连接并继续正常复制 - 即不使用 子句UNTIL。这意味着继续执行到 binlog 的末尾并等待新的 binlog 事件。

相关内容