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/concepts-data-in-replication.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ manager: kfile
8
8
editor: jasonwhowell
9
9
ms.service: mysql
10
10
ms.topic: article
11
-
ms.date: 06/20/2018
11
+
ms.date: 08/31/2018
12
12
---
13
13
14
14
# Replicate data into Azure Database for MySQL
@@ -24,16 +24,17 @@ The main scenarios to consider using Data-in Replication are:
24
24
## Limitations and considerations
25
25
26
26
### Data not replicated
27
-
The [*mysql system database*](https://dev.mysql.com/doc/refman/5.7/en/system-database.html) on the primary server is not replicated. Changes to accounts and permissions on the primary server are not replicated. If you create an account on the primary server and this account needs to access the replica server, then manually create the same account on the replica server side. To understand what tables are contained in the system database, see the [MySQL manual](https://dev.mysql.com/doc/refman/5.7/en/system-database.html).
27
+
The [*mysql system database*](https://dev.mysql.com/doc/refman/5.7/en/system-database.html) on the master server is not replicated. Changes to accounts and permissions on the master server are not replicated. If you create an account on the master server and this account needs to access the replica server, then manually create the same account on the replica server side. To understand what tables are contained in the system database, see the [MySQL manual](https://dev.mysql.com/doc/refman/5.7/en/system-database.html).
28
28
29
29
### Requirements
30
-
- The primary server version must be at least MySQL version 5.6.
31
-
- The primary 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.
30
+
- The master server version must be at least MySQL version 5.6.
31
+
- 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.
32
32
- Each table must have a primary key.
33
-
-Primary server should use the MySQL InnoDB engine.
34
-
- User must have permissions to configure binary logging and create new users on the primary server.
33
+
-Master server should use the MySQL InnoDB engine.
34
+
- User must have permissions to configure binary logging and create new users on the master server.
35
35
36
36
### Other
37
+
- Data-in replication is only supported in General Purpose and Memory Optimized pricing tiers
37
38
- Global transaction identifiers (GTID) are not supported.
Copy file name to clipboardExpand all lines: articles/mysql/howto-data-in-replication.md
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,12 @@ manager: kfile
8
8
editor: jasonwhowell
9
9
ms.service: mysql
10
10
ms.topic: article
11
-
ms.date: 06/20/2018
11
+
ms.date: 08/31/2018
12
12
---
13
13
14
14
# How to configure Azure Database for MySQL Data-in Replication
15
15
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.
17
17
18
18
This article assumes that you have at least some prior experience with MySQL servers and databases.
19
19
@@ -29,14 +29,14 @@ This article assumes that you have at least some prior experience with MySQL ser
29
29
30
30
2. Create same user accounts and corresponding privileges
31
31
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.
33
33
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.
36
36
37
37
1. Turn on binary logging
38
38
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:
40
40
41
41
```sql
42
42
SHOW VARIABLES LIKE'log_bin';
@@ -46,19 +46,19 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
46
46
47
47
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.
48
48
49
-
2.Primary server settings
49
+
2.Master server settings
50
50
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.
52
52
53
53
```sql
54
54
SET GLOBAL lower_case_table_names =1;
55
55
```
56
56
57
57
3. Create a new replication role and set up permission
58
58
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.
60
60
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).
62
62
63
63
**SQL Command**
64
64
@@ -95,9 +95,9 @@ 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 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.
101
101
102
102
```sql
103
103
FLUSH TABLES WITH READ LOCK;
@@ -115,15 +115,15 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
115
115
116
116

117
117
118
-
## Dump and restore primary server
118
+
## Dump and restore master server
119
119
120
-
1. Dump all databases from primary server
120
+
1. Dump all databases from master server
121
121
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.
123
123
124
-
2. Set primary server to read/write mode
124
+
2. Set master server to read/write mode
125
125
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.
127
127
128
128
```sql
129
129
SET GLOBAL read_only = OFF;
@@ -134,21 +134,21 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
134
134
135
135
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.
136
136
137
-
## Link primary and replica servers to start Data-in Replication
137
+
## Link master and replica servers to start Data-in Replication
138
138
139
-
1. Set primary server
139
+
1. Set master server
140
140
141
141
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.
142
142
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.
- 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
152
152
- master_log_file: binary log file name from running `show master status`
153
153
- master_log_pos: binary log position from running `show master status`
154
154
- 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
166
166
-----END CERTIFICATE-----'
167
167
```
168
168
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.
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.
Copy file name to clipboardExpand all lines: articles/mysql/reference-data-in-stored-procedures.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,21 @@ manager: kfile
8
8
editor: jasonwhowell
9
9
ms.service: mysql
10
10
ms.topic: article
11
-
ms.date: 05/18/2018
11
+
ms.date: 08/31/2018
12
12
---
13
13
14
14
# Azure Database for MySQL Data-in Replication Stored Procedures
15
15
16
16
Data-in Replication allows you to synchronize data from a MySQL server running on-premises, in virtual machines, or database services hosted by other cloud providers into the Azure Database for MySQL service.
17
17
18
-
The following stored procedures are used to set up or remove Data-in Replication between a primary and replica.
18
+
The following stored procedures are used to set up or remove Data-in Replication between a master and replica.
|*mysql.az_replication_change_primary*|master_host<br/>master_user<br/>master_password<br/>master_port<br/>master_log_file<br/>master_log_pos<br/>master_ssl_ca|N/A|To transfer data with SSL mode, pass in the CA certificate’s context into the master_ssl_ca parameter. </br><br>To transfer data without SSL, pass in an empty string into the master_ssl_ca parameter.|
22
+
|*mysql.az_replication_change_master*|master_host<br/>master_user<br/>master_password<br/>master_port<br/>master_log_file<br/>master_log_pos<br/>master_ssl_ca|N/A|To transfer data with SSL mode, pass in the CA certificate’s context into the master_ssl_ca parameter. </br><br>To transfer data without SSL, pass in an empty string into the master_ssl_ca parameter.|
|*mysql.az_replication _remove_primary*|N/A|N/A|Removes the replication relationship between the primary and replica.|
25
+
|*mysql.az_replication _remove_master*|N/A|N/A|Removes the replication relationship between the master and replica.|
26
26
|*mysql.az_replication_skip_counter*|N/A|N/A|Skips one replication error.|
27
27
28
-
To set up data-in replication between a primary and a replica in Azure Database for MySQL, refer to [how to configure data-in replication](howto-data-in-replication.md).
28
+
To set up data-in replication between a master and a replica in Azure Database for MySQL, refer to [how to configure data-in replication](howto-data-in-replication.md).
0 commit comments