You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/mysql/howto-data-in-replication.md
+21-8Lines changed: 21 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: ajlam
5
5
ms.author: andrela
6
6
ms.service: mysql
7
7
ms.topic: conceptual
8
-
ms.date: 3/18/2020
8
+
ms.date: 3/27/2020
9
9
---
10
10
11
11
# How to configure Azure Database for MySQL Data-in Replication
@@ -14,6 +14,8 @@ In this article, you will learn how to set up Data-in Replication in the Azure D
14
14
15
15
This article assumes that you have at least some prior experience with MySQL servers and databases.
16
16
17
+
Review the [limitations and requirements](concepts-data-in-replication.md#limitations-and-considerations) of data-in replication prior to performing the steps in this article.
18
+
17
19
## Create a MySQL server to be used as replica
18
20
19
21
1. Create a new Azure Database for MySQL server
@@ -28,10 +30,21 @@ This article assumes that you have at least some prior experience with MySQL ser
28
30
29
31
User accounts are not replicated from the master server to the replica server. If you plan on providing users with access to the replica server, you need to manually create all accounts and corresponding privileges on this newly created Azure Database for MySQL server.
30
32
33
+
3. Add the master server's IP address to the replica's firewall rules.
34
+
35
+
Update firewall rules using the [Azure portal](howto-manage-firewall-using-portal) or [Azure CLI](howto-manage-firewall-using-cli).
36
+
31
37
## Configure the master server
32
-
The following steps prepare and configure the MySQL server hosted on-premises, in a virtual machine, or database service hosted by other cloud providers for Data-in Replication. This server is the "master" in Data-in replication.
38
+
The following steps prepare and configure the MySQL server hosted on-premises, in a virtual machine, or database service hosted by other cloud providers for Data-in Replication. This server is the "master" in Data-in replication.
39
+
40
+
41
+
1. Review the [master server requirements](concepts-data-in-replication.md#requirements) before proceeding.
42
+
43
+
For example, ensure the master server allows both inbound and outbound traffic on port 3306 and that the master server has a **public IP address**, the DNS is publicly accessible, or has a fully qualified domain name (FQDN).
44
+
45
+
Test connectivity to the master server by attempting to connect from a tool such as the MySQL command-line hosted on another machine or from the [Azure Cloud Shell](https://docs.microsoft.com/azure/cloud-shell/overview) available in the Azure portal
33
46
34
-
1. Turn on binary logging
47
+
2. Turn on binary logging
35
48
36
49
Check to see if binary logging has been enabled on the master by running the following command:
37
50
@@ -43,15 +56,15 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
43
56
44
57
If `log_bin` is returned with the value "OFF", turn on binary logging by editing your my.cnf file so that `log_bin=ON` and restart your server for the change to take effect.
45
58
46
-
2. Master server settings
59
+
3. Master server settings
47
60
48
61
Data-in Replication requires parameter `lower_case_table_names` to be consistent between the master and replica servers. This parameter is 1 by default in Azure Database for MySQL.
49
62
50
63
```sql
51
64
SET GLOBAL lower_case_table_names =1;
52
65
```
53
66
54
-
3. Create a new replication role and set up permission
67
+
4. Create a new replication role and set up permission
55
68
56
69
Create a user account on the master server that is configured with replication privileges. This can be done through SQL commands or a tool like MySQL Workbench. Consider whether you plan on replicating with SSL as this will need to be specified when creating the user. Refer to the MySQL documentation to understand how to [add user accounts](https://dev.mysql.com/doc/refman/5.7/en/adding-users.html) on your master server.
57
70
@@ -92,7 +105,7 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
Before starting to dump out the database, the server needs to be placed in read-only mode. While in read-only mode, the master will be unable to process any write transactions. Evaluate the impact to your business and schedule the read-only window in an off-peak time if necessary.
98
111
@@ -101,7 +114,7 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
101
114
SET GLOBAL read_only =ON;
102
115
```
103
116
104
-
5. Get binary log file name and offset
117
+
6. Get binary log file name and offset
105
118
106
119
Run the [`show master status`](https://dev.mysql.com/doc/refman/5.7/en/show-master-status.html) command to determine the current binary log file name and offset.
107
120
@@ -162,7 +175,7 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
0 commit comments