Using REPLICATE_REWRITE_DB in Azure MySQL database

2024-04-23T12:20:53.6433333+00:00

Database names in my Master and Replica server are different.

Master DB name - uas-tms-20211111
Slave DB name - uas-tms-uat

To get the replication working in this scenario, we use REPLICATE_REWRITE_DB option in on-prem MySQL servers.
https://dev.mysql.com/doc/refman/8.0/en/change-replication-filter.html

How can I achieve this with the Azure MySQL database.

Getting below error in the synchronization process:

1049 -> Worker 1 failed executing transaction 'ANONYMOUS' at source log TMSe-UAT-DB-bin.000028, end_log_pos 1987363; Error 'Unknown database 'uas-tms-20211111'' on query. Default database: 'uas-tms-20211111'. Query: 'ALTER TABLE uas-tms-20211111.temp_taxesfees ADD COLUMN newcol VARCHAR(45) NULL AFTER taxesFeesId'

Master - MySQL installed on a Azure VM
Slave - Azure MySQL Database

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
842 questions
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,477 Reputation points Microsoft Employee
    2024-04-25T16:35:16.2366667+00:00

    @Srikar Gondesi - UAS Database Administrator As per the product team the mentioned replication filter REPLICATE_REWRITE_DB is not supported with Azure Database for MySQL Flexible Server. Currently there is no inherent feature with Flexible Server to support this use case.

    To better understand your requirements and potentially suggest alternative solutions, it would be helpful to know why you require the use of the replication filter. 

    Regards

    Geetha


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.