Skip to content

Commit 4775182

Browse files
committed
data-in replication improvements
1 parent b389a01 commit 4775182

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

articles/mysql/howto-data-in-replication.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: ajlam
55
ms.author: andrela
66
ms.service: mysql
77
ms.topic: conceptual
8-
ms.date: 3/18/2020
8+
ms.date: 3/27/2020
99
---
1010

1111
# 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
1414

1515
This article assumes that you have at least some prior experience with MySQL servers and databases.
1616

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+
1719
## Create a MySQL server to be used as replica
1820

1921
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
2830

2931
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.
3032

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+
3137
## 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
3346

34-
1. Turn on binary logging
47+
2. Turn on binary logging
3548

3649
Check to see if binary logging has been enabled on the master by running the following command:
3750

@@ -43,15 +56,15 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
4356

4457
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.
4558

46-
2. Master server settings
59+
3. Master server settings
4760

4861
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.
4962

5063
```sql
5164
SET GLOBAL lower_case_table_names = 1;
5265
```
5366

54-
3. Create a new replication role and set up permission
67+
4. Create a new replication role and set up permission
5568

5669
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.
5770

@@ -92,7 +105,7 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
92105
![Replication Slave](./media/howto-data-in-replication/replicationslave.png)
93106

94107

95-
4. Set the master server to read-only mode
108+
5. Set the master server to read-only mode
96109

97110
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.
98111

@@ -101,7 +114,7 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
101114
SET GLOBAL read_only = ON;
102115
```
103116

104-
5. Get binary log file name and offset
117+
6. Get binary log file name and offset
105118

106119
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.
107120

@@ -162,7 +175,7 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
162175

163176
```sql
164177
SET @cert = '-----BEGIN CERTIFICATE-----
165-
PLACE YOUR PUBLIC KEY CERTIFICATE'S CONTEXT HERE
178+
PLACE YOUR PUBLIC KEY CERTIFICATE'`S CONTEXT HERE
166179
-----END CERTIFICATE-----'
167180
```
168181

0 commit comments

Comments
 (0)