Bug #86288 | mysqlbinlog read-from-remote-server not honoring rewrite_db filtering | ||
---|---|---|---|
Submitted: | 11 May 2017 20:34 | Modified: | 6 Jul 2017 9:44 |
Reporter: | Julie Hergert | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 5.7.18 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[11 May 2017 20:34]
Julie Hergert
[19 May 2017 19:12]
Sven Sandberg
Thank you for the bug report. I confirm that rewrite-db is not implemented when dumping from a remote server. Note that there is a simple workaround: use --raw (which dumps a remote binlog in binary form), and pipe it to another mysqlbinlog process that reads from stdin and rewrites the database. The other mysqlbinlog process reads locally so it will honor --rewrite-db. Here is how to do it for the command line in this bug report: mysqlbinlog --database=bar --read-from-remote-server --host=<dbsvr> --user=root --password=xxx replicatelogs.000013 --raw | mysqlbinlog - --rewrite-db='foo->bar'
[6 Jul 2017 9:41]
Margaret Fisher
Posted by developer: Added changelog entry for MySQL 5.7.20 and 8.0.3: When running <command>mysqlbinlog</command> with the --read-from-remote-server option, rewrite rules specified using the --rewrite-db option were ignored, so data was not written to the target database.