Replicate data into Azure Database for MySQL
Data-in Replication allows you to synchronize data from an external MySQL server into the Azure Database for MySQL service. The external server can be on-premises, in virtual machines, or a database service hosted by other cloud providers. Data-in Replication is based on the binary log (binlog) file position-based replication native to MySQL. To learn more about binlog replication, see the MySQL binlog replication overview.
When to use Data-in Replication
The main scenarios to consider using Data-in Replication are:
- Hybrid Data Synchronization: With Data-in Replication, you can keep data synchronized between your on-premises servers and Azure Database for MySQL. This synchronization is useful for creating hybrid applications. This method is appealing when you have an existing local database server but want to move the data to a region closer to end users.
- Multi-Cloud Synchronization: For complex cloud solutions, use Data-in Replication to synchronize data between Azure Database for MySQL and different cloud providers, including virtual machines and database services hosted in those clouds.
Limitations and considerations
Data not replicated
The mysql system database on the master server isn't replicated. Changes to accounts and permissions on the master server aren't replicated. If you create an account on the master server and this account needs to access the replica server, manually create the same account on the replica server side. To understand what tables are contained in the system database, see the MySQL manual.
- The master server version must be at least MySQL version 5.6.
- The master and replica server versions must be the same. For example, both must be MySQL version 5.6 or both must be MySQL version 5.7.
- Each table must have a primary key.
- Master server should use the MySQL InnoDB engine.
- User must have permissions to configure binary logging and create new users on the master server.
- Data-in replication is only supported in General Purpose and Memory Optimized pricing tiers.
- Global transaction identifiers (GTID) are not supported.
Send feedback about: