Skip to content

Commit f44b764

Browse files
authored
change "primary" to "master"
1 parent 1e14cd4 commit f44b764

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

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

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ manager: kfile
88
editor: jasonwhowell
99
ms.service: mysql
1010
ms.topic: article
11-
ms.date: 06/20/2018
11+
ms.date: 08/31/2018
1212
---
1313

1414
# How to configure Azure Database for MySQL Data-in Replication
1515

16-
In this article, you will learn how to set up Data-in Replication in the Azure Database for MySQL service by configuring the primary and replica servers. Data-in Replication allows you to synchronize data from a primary MySQL server running on-premises, in virtual machines, or database services hosted by other cloud providers into a replica in the Azure Database for MySQL service.
16+
In this article, you will learn how to set up Data-in Replication in the Azure Database for MySQL service by configuring the master and replica servers. Data-in Replication allows you to synchronize data from a master MySQL server running on-premises, in virtual machines, or database services hosted by other cloud providers into a replica in the Azure Database for MySQL service.
1717

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

@@ -29,14 +29,14 @@ This article assumes that you have at least some prior experience with MySQL ser
2929
3030
2. Create same user accounts and corresponding privileges
3131

32-
User accounts are not replicated from the primary 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.
32+
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.
3333

34-
## Configure the primary server
35-
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 "primary" in Data-in replication.
34+
## Configure the master server
35+
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.
3636

3737
1. Turn on binary logging
3838

39-
Check to see if binary logging has been enabled on the primary by running the following command:
39+
Check to see if binary logging has been enabled on the master by running the following command:
4040

4141
```sql
4242
SHOW VARIABLES LIKE 'log_bin';
@@ -46,19 +46,19 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
4646

4747
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.
4848

49-
2. Primary server settings
49+
2. Master server settings
5050

51-
Data-in Replication requires parameter `lower_case_table_names` to be consistent between the primary and replica servers. This parameter is 1 by default in Azure Database for MySQL.
51+
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.
5252

5353
```sql
5454
SET GLOBAL lower_case_table_names = 1;
5555
```
5656

5757
3. Create a new replication role and set up permission
5858

59-
Create a user account on the primary 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 primary server.
59+
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.
6060

61-
In the commands below, the new replication role created is able to access the primary from any machine, not just the machine that hosts the primary itself. This is done by specifying "syncuser@'%'" in the create user command. See the MySQL documentation to learn more about [specifying account names](https://dev.mysql.com/doc/refman/5.7/en/account-names.html).
61+
In the commands below, the new replication role created is able to access the master from any machine, not just the machine that hosts the master itself. This is done by specifying "syncuser@'%'" in the create user command. See the MySQL documentation to learn more about [specifying account names](https://dev.mysql.com/doc/refman/5.7/en/account-names.html).
6262

6363
**SQL Command**
6464

@@ -95,9 +95,9 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
9595
![Replication Slave](./media/howto-data-in-replication/replicationslave.png)
9696

9797

98-
4. Set the primary server to read-only mode
98+
4. Set the master server to read-only mode
9999

100-
Before starting to dump out the database, the server needs to be placed in read-only mode. While in read-only mode, the primary 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.
100+
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.
101101

102102
```sql
103103
FLUSH TABLES WITH READ LOCK;
@@ -115,15 +115,15 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
115115

116116
![Master Status Results](./media/howto-data-in-replication/masterstatus.png)
117117

118-
## Dump and restore primary server
118+
## Dump and restore master server
119119

120-
1. Dump all databases from primary server
120+
1. Dump all databases from master server
121121

122-
You can use mysqldump to dump databases from your primary. For details, refer to [Dump & Restore](concepts-migrate-dump-restore.md). It is unnecessary to dump MySQL library and test library.
122+
You can use mysqldump to dump databases from your master. For details, refer to [Dump & Restore](concepts-migrate-dump-restore.md). It is unnecessary to dump MySQL library and test library.
123123

124-
2. Set primary server to read/write mode
124+
2. Set master server to read/write mode
125125

126-
Once the database has been dumped, change the primary MySQL server back to read/write mode.
126+
Once the database has been dumped, change the master MySQL server back to read/write mode.
127127

128128
```sql
129129
SET GLOBAL read_only = OFF;
@@ -134,21 +134,21 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
134134

135135
Restore the dump file to the server created in the Azure Database for MySQL service. Refer to [Dump & Restore](concepts-migrate-dump-restore.md) for how to restore a dump file to a MySQL server. If the dump file is large, upload it to a virtual machine in Azure within the same region as your replica server. Restore it to the Azure Database for MySQL server from the virtual machine.
136136

137-
## Link primary and replica servers to start Data-in Replication
137+
## Link master and replica servers to start Data-in Replication
138138

139-
1. Set primary server
139+
1. Set master server
140140

141141
All Data-in Replication functions are done by stored procedures. You can find all procedures at [Data-in Replication Stored Procedures](reference-data-in-stored-procedures.md). The stored procedures can be run in the MySQL shell or MySQL Workbench.
142142

143-
To link two servers and start replication, login to the target replica server in the Azure DB for MySQL service and set the external instance as the primary server. This is done by using the `mysql.az_replication_change_primary` stored procedure on the Azure DB for MySQL server.
143+
To link two servers and start replication, login to the target replica server in the Azure DB for MySQL service and set the external instance as the master server. This is done by using the `mysql.az_replication_change_master` stored procedure on the Azure DB for MySQL server.
144144

145145
```sql
146-
CALL mysql.az_replication_change_primary('<master_host>', '<master_user>', '<master_password>', 3306, '<master_log_file>', <master_log_pos>, '<master_ssl_ca>');
146+
CALL mysql.az_replication_change_master('<master_host>', '<master_user>', '<master_password>', 3306, '<master_log_file>', <master_log_pos>, '<master_ssl_ca>');
147147
```
148148

149-
- master_host: hostname of the primary server
150-
- master_user: username for the primary server
151-
- master_password: password for the primary server
149+
- master_host: hostname of the master server
150+
- master_user: username for the master server
151+
- master_password: password for the master server
152152
- master_log_file: binary log file name from running `show master status`
153153
- master_log_pos: binary log position from running `show master status`
154154
- master_ssl_ca: CA certificate’s context. If not using SSL, pass in empty string.
@@ -166,17 +166,17 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
166166
-----END CERTIFICATE-----'
167167
```
168168

169-
Replication with SSL is set up between a primary server hosted in the domain “companya.com” and a replica server hosted in Azure Database for MySQL. This stored procedure is run on the replica.
169+
Replication with SSL is set up between a master server hosted in the domain “companya.com” and a replica server hosted in Azure Database for MySQL. This stored procedure is run on the replica.
170170

171171
```sql
172-
CALL mysql.az_replication_change_primary('primary.companya.com', 'syncuser', 'P@ssword!', 3306, 'mysql-bin.000002', 120, @cert);
172+
CALL mysql.az_replication_change_master('master.companya.com', 'syncuser', 'P@ssword!', 3306, 'mysql-bin.000002', 120, @cert);
173173
```
174174
*Replication without SSL*
175175

176-
Replication without SSL is set up between a primary server hosted in the domain “companya.com” and a replica server hosted in Azure Database for MySQL. This stored procedure is run on the replica.
176+
Replication without SSL is set up between a master server hosted in the domain “companya.com” and a replica server hosted in Azure Database for MySQL. This stored procedure is run on the replica.
177177

178178
```sql
179-
CALL mysql.az_replication_change_primary('primary.companya.com', 'syncuser', 'P@ssword!', 3306, 'mysql-bin.000002', 120, '');
179+
CALL mysql.az_replication_change_master('master.companya.com', 'syncuser', 'P@ssword!', 3306, 'mysql-bin.000002', 120, '');
180180
```
181181

182182
2. Start replication
@@ -201,18 +201,18 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
201201

202202
### Stop replication
203203

204-
To stop replication between the primary and replica server, use the following stored procedure:
204+
To stop replication between the master and replica server, use the following stored procedure:
205205

206206
```sql
207207
CALL mysql.az_replication_stop;
208208
```
209209

210210
### Remove replication relationship
211211

212-
To remove the relationship between primary and replica server, use the following stored procedure:
212+
To remove the relationship between master and replica server, use the following stored procedure:
213213

214214
```sql
215-
CALL mysql.az_replication_remove_primary;
215+
CALL mysql.az_replication_remove_master;
216216
```
217217

218218
### Skip replication error
@@ -224,4 +224,4 @@ CALL mysql.az_replication_skip_counter;
224224
```
225225

226226
## Next steps
227-
- Learn more about [Data-in Replication](concepts-data-in-replication.md) for Azure Database for MySQL.
227+
- Learn more about [Data-in Replication](concepts-data-in-replication.md) for Azure Database for MySQL.

0 commit comments

Comments
 (0)