【问题标题】:RDS and pt-table-sync. Tables can't sync. How to get around this?RDS 和 pt-table-sync。表无法同步。如何解决这个问题?
【发布时间】:2013-03-26 12:18:10
【问题描述】:

我正在尝试使用 pt-table-sync 同步到表。 问题是RDS bilong_format 设置为MIXED,工具需要STATEMENT。而且我们没有超级特权来改变它。

如何解决这个问题并同步我的表格?

错误描述如下:

This tool requires binlog_format=STATEMENT, but the current binlog_format is set to MIXED and an error occurred while attempting to change it.  If running MySQL 5.1.29 or newer, setting binlog_format requires the SUPER privilege.  You will need to manually set binlog_format to 'STATEMENT' before running this tool.

【问题讨论】:

    标签: mysql sync percona rds


    【解决方案1】:

    建议

    当您运行pt-table-sync 时,不要使用--execute 选项,因为它可能需要所有必要的授权。尝试使用 --sync-to-master--print 并将输出重定向到 SQL 文本文件。如果生成了 SQL 文本文件,请查看 SQL 文本文件。

    如果 SQL 文本文件只包含 REPLACE 语句,只需在 Master 上运行 SQL 文本文件。它会将所有内容复制到从站。

    如果它甚至包含一个 DELETE 语句,最好放弃 RDS 从站并启动一个新的只读 RDS 从站。

    试试看!!!

    【讨论】:

      猜你喜欢
      • 2015-01-19
      • 1970-01-01
      • 2020-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-18
      相关资源
      最近更新 更多