Skip to content

Commit 92c99fb

Browse files
authored
Merge pull request #222649 from markingmyname/vandhana
[MySQL] New Data-out flexible server features
2 parents b146c81 + f8ed643 commit 92c99fb

9 files changed

+346
-86
lines changed
Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
---
2-
title: Data-in replication - Azure Database for MySQL Flexible
2+
title: Data-in replication - Azure Database for MySQL Flexible Server
33
description: Learn about using Data-in replication to synchronize from an external server into the Azure Database for MySQL Flexible service.
4+
author: VandhanaMehta
5+
ms.author: vamehta
6+
ms.reviewer: maghan
7+
ms.date: 12/30/2022
48
ms.service: mysql
59
ms.subservice: flexible-server
610
ms.topic: conceptual
7-
author: VandhanaMehta
8-
ms.author: vamehta
9-
ms.date: 06/08/2021
1011
---
1112

12-
# Replicate data into Azure Database for MySQL Flexible Server
13+
# Replicate data into Azure Database for MySQL Flexible Server
1314

1415
[!INCLUDE[applies-to-mysql-flexible-server](../includes/applies-to-mysql-flexible-server.md)]
1516

1617
Data-in replication allows you to synchronize data from an external MySQL server into the Azure Database for MySQL Flexible service. The external server can be on-premises, in virtual machines, Azure Database for MySQL Single Server, or a database service hosted by other cloud providers. Data-in replication is based on the binary log (binlog) file position-based. To learn more about binlog replication, see the [MySQL binlog replication overview](https://dev.mysql.com/doc/refman/5.7/en/binlog-replication-configuration-overview.html).
1718

18-
> [!Note]
19+
> [!NOTE]
1920
> GTID-based replication is currently not supported for Azure Database for MySQL Flexible Servers.<br>
20-
> Configuring Data-in replication for zone-redundant high availability servers is not supported.
21+
> Configuring Data-in replication for zone-redundant high-availability servers is not supported.
2122
2223
## When to use Data-in replication
2324

@@ -33,32 +34,34 @@ For migration scenarios, use the [Azure Database Migration Service](https://azur
3334

3435
### Data not replicated
3536

36-
The [*mysql system database*](https://dev.mysql.com/doc/refman/5.7/en/system-schema.html) on the source server isn't replicated. In addition, changes to accounts and permissions on the source server aren't replicated. If you create an account on the source server and this account needs to access the replica server, manually create the same account on the replica server. To understand what tables are contained in the system database, see the [MySQL manual](https://dev.mysql.com/doc/refman/5.7/en/system-schema.html).
37+
The [*mysql system database*](https://dev.mysql.com/doc/refman/5.7/en/system-schema.html) on the source server isn't replicated. In addition, changes to accounts and permissions on the source server aren't replicated. If you create an account on the source server and this account needs to access the replica server, manually create the same account on the replica server. To understand the tables in the system database, see the [MySQL manual](https://dev.mysql.com/doc/refman/5.7/en/system-schema.html).
38+
39+
### Data-in replication not supported on High Availability (HA) enabled servers
40+
41+
It isn't supported to configure Data-in replication for servers that have high availability (HA) option enabled. On HA-enabled servers, the stored procedures for replication `mysql.az_replication_*` won't be available.
3742

38-
### Data-in replication not supported on HA enabled servers
39-
It is not supported to configure Data-in replication for servers which have high availability (HA) option enabled. On HA enabled servers, the stored procedures for replication `mysql.az_replication_*` won't be available.
40-
> [!Tip]
41-
>If you are using HA server as a source server, MySQL native binary log (binlog) file position-based replication would fail, when failover happens on the server. If replica server supports GTID based replication, we should configure GTID based replication.
43+
> [!TIP]
44+
> If you are using the HA server as a source server, MySQL native binary log (binlog) file position-based replication will fail when failover happens on the server. If replica server supports GTID based replication, we should configure GTID based replication.
4245
43-
### Filtering
46+
### Filter
4447

45-
Modifying the parameter `replicate_wild_ignore_table` used to create replication filter for tables, is currently not supported for Azure Database for MySQL -Flexible server.
48+
Modifying the parameter `replicate_wild_ignore_table` used to create replication filter for tables is currently not supported for Azure Database for MySQL -Flexible server.
4649

4750
### Requirements
4851

4952
- The source server version must be at least MySQL version 5.7.
50-
- Our recommendation is to have the same version for source and replica server versions. For example, both must be MySQL version 5.7 or both must be MySQL version 8.0.
51-
- Our recommendation is to have a primary key in each table. If we have table without primary key, you might face slowness in replication.
53+
- Our recommendation is to have the same version for source and replica server versions. For example, both must be MySQL version 5.7, or both must be MySQL version 8.0.
54+
- Our recommendation is to have a primary key in each table. If we have a table without primary key, you might face slowness in replication.
5255
- The source server should use the MySQL InnoDB engine.
53-
- User must have permissions to configure binary logging and create new users on the source server.
56+
- User must have the right permissions to configure binary logging and create new users on the source server.
5457
- Binary log files on the source server shouldn't be purged before the replica applies those changes. If the source is Azure Database for MySQL refer how to configure binlog_expire_logs_seconds for [Flexible server](./concepts-server-parameters.md#binlog_expire_logs_seconds) or [Single server](../concepts-server-parameters.md#binlog_expire_logs_seconds)
5558
- If the source server has SSL enabled, ensure the SSL CA certificate provided for the domain has been included in the `mysql.az_replication_change_master` stored procedure. Refer to the following [examples](./how-to-data-in-replication.md#link-source-and-replica-servers-to-start-data-in-replication) and the `master_ssl_ca` parameter.
5659
- Ensure that the machine hosting the source server allows both inbound and outbound traffic on port 3306.
5760
- Ensure that the source server has a **public IP address**, that DNS is publicly accessible, or that the source server has a fully qualified domain name (FQDN).
58-
- In case of public access, ensure that the source server has a public IP address, that DNS is publicly accessible, or that the source server has a fully qualified domain name (FQDN).
59-
- In case of private access ensure that the source server name can be resolved and is accessible from the VNet where the Azure Database for MySQL instance is running.For more details see, [Name resolution for resources in Azure virtual networks](../../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md)
61+
- With public access, ensure that the source server has a public IP address, that DNS is publicly accessible, or that the source server has a fully qualified domain name (FQDN).
62+
- With private access, ensure that the source server name can be resolved and is accessible from the VNet where the Azure Database for MySQL instance is running. (For more details, visit [Name resolution for resources in Azure virtual networks](../../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md)).
6063

6164
## Next steps
6265

63-
- Learn how to [set up data-in replication](how-to-data-in-replication.md)
64-
- Learn about [replicating in Azure with read replicas](concepts-read-replicas.md)
66+
- Learn more on how to [set up data-in replication](how-to-data-in-replication.md)
67+
- Learn more about [replicating in Azure with read replicas](concepts-read-replicas.md)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Data-out replication - Azure Database for MySQL Flexible Server
3+
description: Learn about the concepts of data-out replication out of Azure Database for MySQL - Flexible Server to another MySQL server
4+
author: VandhanaMehta
5+
ms.author: vamehta
6+
ms.reviewer: maghan
7+
ms.date: 12/30/2022
8+
ms.service: mysql
9+
ms.subservice: flexible-server
10+
ms.topic: conceptual
11+
---
12+
13+
# Replicate data from Azure Database for MySQL Flexible Server
14+
15+
[!INCLUDE[applies-to-mysql-flexible-server](../includes/applies-to-mysql-flexible-server.md)]
16+
17+
Data-out replication allows you to synchronize data out of Azure Database for MySQL - Flexible Server to another MySQL server using MySQL native replication. The MySQL server (replica) can be on-premises, in virtual machines, or a database service hosted by other cloud providers. While [Data-in replication](concepts-data-in-replication.md) helps to move data into Azure Database for MySQL - Flexible Server (replica), Data-out replication would allow you to transfer data out of Azure Database for MySQL - Flexible Server (Primary). With Data-out replication, the binary log (binlog) is made community consumable allowing the Azure Database for MySQL- Flexible server to act as a Primary server for the external replicas. To learn more about binlog replication, see the [MySQL binlog replication overview](https://dev.mysql.com/doc/refman/5.7/en/binlog-replication-configuration-overview.html).
18+
19+
> [!NOTE]
20+
> Data-out replication is not supported on Azure Database for MySQL - Flexible Server, which has Azure authentication configured.
21+
22+
The main scenarios to consider about using Data-out replication are:
23+
24+
- **Hybrid Data Synchronization:** Data-out replication can be used to keep the data synchronized between Azure Database for MySQL Flexible server and on-premises servers. This method will help to integrate seamlessly between cloud and on-premises systems in a hybrid solution. This solution can also be useful if you want to avoid vendor lock-in.
25+
26+
- **Multi-Cloud Synchronization:** For complex cloud solutions, use Data-out replication to synchronize data between Azure Database for MySQL Flexible Server and different cloud providers, including virtual machines and database services hosted in those clouds.
27+
28+
- **Migration:** Customers can do Minimal Time migration using open-source tools such as MyDumper/MyLoader with Data-out replication to migrate data out Azure MySQL Flexible server.
29+
30+
## Limitations and considerations
31+
32+
### Azure AD isn't supported
33+
34+
Data-out replication isn't supported on Azure Database for MySQL - Flexible Server, which has Azure authentication configured. Any Azure AD transaction (Azure AD user create/update) on the source server will break data-out replication.
35+
36+
> [!TIP]
37+
> Use guidance published here - MySQL :: MySQL Replication :: 2.7.3 Skipping Transactions to skip past an event or events by issuing a CHANGE MASTER TO statement to move the source's binary log position forward. Restart replication posts the action.
38+
39+
### Filter
40+
41+
You must use the replication filter to filter out Azure custom tables on the replica server. This can be achieved by setting Replicate_Wild_Ignore_Table = "mysql.\_\_%" to filter the Azure MySQL internal tables on the replica. To modify this parameter from the Azure portal, navigate to Azure Database for MySQL Flexible server and select "Server parameters" to view/edit the Replicate_Wild_Ignore_Table parameter.
42+
43+
Refer to the following general guidance on the replication filter:
44+
- MySQL 5.7 Reference Manual - 13.4.2.2 CHANGE REPLICATION FILTER Statement
45+
- MySQL 5.7 Reference Manual - 16.1.6.3 Replica Server Options and Variables
46+
- MySQL 8.0 Reference Manual - 17.2.5.4 Replication Channel Based Filters.
47+
48+
## Next steps
49+
50+
- How to configure [Data-out replication](how-to-data-out-replication.md)
51+
- Learn about [Data-in replication](concepts-data-in-replication.md)
52+
- How to configure [Data-in replication](how-to-data-in-replication.md)

0 commit comments

Comments
 (0)