gpt4 book ai didi

Mysql 5.6 到 5.1 复制

转载 作者:行者123 更新时间:2023-11-28 23:34:38 25 4
gpt4 key购买 nike

我知道mysql不支持这个。但是根据http://dev.mysql.com/doc/refman/5.6/en/replication-compatibility.html还有https://serverfault.com/questions/262936/is-replication-from-mysql-5-5-master-to-a-5-1-slave-possible这是可能的。

我遇到了问题:

Relay log read failure: Could not parse relay log event entry.

The possible reasons are:

  • the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log),
  • the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log),
  • a network problem, or a bug in the master's or slave's MySQL code.

If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.

二进制日志没有损坏,但中继日志已损坏,即使我重置了复制。主人没有腐败。只有奴隶才会腐败。

它似乎只发生在 utf8 表上。更具体地说,在对 utf8 表进行更改之前,中继日志中没有损坏。

是否有修复或 5.6 到 5.1 不可能?

最佳答案

Mysql文档没有说不同版本的复制是不可能的,但它说低版本(master)到高版本(slave)是可以的,但反之可能会出现问题。

假设有一些新功能受新版本支持但旧版本不支持,在这种情况下,当该语句将在旧版本上复制时会产生问题。

例如,存储过程是在 5.4 中引入的,因此如果您在 5.6 主版本中使用此功能,那么它会在 5.1 版本上复制时产生问题。

另一个示例可能是热更改,因为它是在 mysql 5.6 中引入的,这是默认功能,因此如果您复制到 5.6 之前的旧版本,这可能会产生问题(我没有检查它只是一个示例)。

但是这里您的问题似乎有所不同,因为您说二进制日志甚至在主服务器上都显示损坏,这不应该是由于不同的版本复制。所以首先检查你的二进制日志有什么问题。

即使在附加一个从站之前,只要在启用 binlog 后启动你的主站并尝试读取 binglogs 如果一切正常,那么你可以尝试用它附加一个从站并检查是否可以进行 5.6 到 5.1 的复制。

关于Mysql 5.6 到 5.1 复制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36150992/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com