Skip to content

Commit ea01e8b

Browse files
authored
Merge pull request #222772 from markingmyname/vandhana
[MySQL] Data-out update
2 parents 8f5cb65 + 92691ef commit ea01e8b

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

articles/mysql/TOC.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@
120120
items:
121121
- name: Data-in replication
122122
href: flexible-server/concepts-data-in-replication.md
123-
displayName: replication, read replica
123+
- name: Data-out replication
124+
href: flexible-server/concepts-data-out-replication.md
124125
- name: Read replicas
125126
href: flexible-server/concepts-read-replicas.md
126127
- name: Backup & Restore
@@ -236,6 +237,9 @@
236237
- name: Configure data-in replication
237238
href: flexible-server/how-to-data-in-replication.md
238239
displayName: data-in replication, replica, failover
240+
- name: Configure data-out replication
241+
href: flexible-server/how-to-data-out-replication.md
242+
displayName: data-out replication, replica, failover
239243
- name: Create read replicas
240244
items:
241245
- name: Azure portal

articles/mysql/flexible-server/how-to-data-in-replication.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ The following steps prepare and configure the MySQL server hosted on-premises, i
6161
1. Open the configuration file to edit it and locate **mysqld** section in the file.
6262
1. In the mysqld section, add following line:
6363

64-
```bash
65-
log-bin=mysql-bin.log
66-
```
64+
```bash
65+
log-bin=mysql-bin.log
66+
```
6767

6868
1. Restart the MySQL service on source server (or Restart) for the changes to take effect.
6969
1. After the server is restarted, verify that binary logging is enabled by running the same query as before:
@@ -141,10 +141,6 @@ The results should appear similar to the following. Make sure to note the binary
141141
142142
:::image type="content" source="./media/how-to-data-in-replication/master-status.png" alt-text="Master Status Results":::
143143
144-
#### [Azure Data Studio](#tab/azure-data-studio)
145-
146-
<-----------Content here----------->
147-
148144
---
149145
150146
## Dump and restore the source server

articles/mysql/flexible-server/how-to-data-out-replication.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ ms.reviewer: maghan
77
ms.date: 12/30/2022
88
ms.service: mysql
99
ms.subservice: flexible-server
10-
ms.topic: how-to
10+
ms.topic: how-to
1111
---
1212

1313
# How to configure Azure Database for MySQL Flexible Server data-out replication
1414

15-
[[!INCLUDE[applies-to-mysql-flexible-server](../includes/applies-to-mysql-flexible-server.md)]
15+
[!INCLUDE[applies-to-mysql-flexible-server](../includes/applies-to-mysql-flexible-server.md)]
1616

1717
This article describes how to set up Data-out replication in Azure Database for MySQL Flexible Server by configuring the source and replica servers. This article assumes that you have some prior experience with MySQL servers and databases.
1818

@@ -111,10 +111,6 @@ The results should appear similar to the following. Make sure to note the binary
111111

112112
:::image type="content" source="media/how-to-data-out-replication/mysql-workbench-result.png" alt-text="Screenshot of results.":::
113113

114-
#### [Azure Data Studio](#tab/azure-data-studio)
115-
116-
<-----------Content here----------->
117-
118114
---
119115

120116
## Dump and restore the source server.
@@ -132,6 +128,7 @@ Follow the below steps if the source server has existing data to migrate to the
132128
You can use mysqldump to dump databases from your primary server. For more details, visit [Dump & Restore](../single-server/concepts-migrate-dump-restore.md). It's unnecessary to dump the MySQL library and test library.
133129

134130
1. Set the source server to read/write mode.
131+
135132
After dumping the database, change the source MySQL server to read/write mode.
136133

137134
```sql
@@ -153,12 +150,14 @@ Restore the dump file to the server created in the Azure Database for MySQL Flex
153150

154151
1. Set the replica server by connecting to it and opening the MySQL shell on the replica server. From the prompt, run the following operation, which configures several MySQL replication settings at the same time:
155152

153+
```sql
156154
CHANGE THE REPLICATION SOURCE TO
157155
SOURCE_HOST='<master_host>',
158156
SOURCE_USER='<master_user>',
159157
SOURCE_PASSWORD='<master_password>',
160158
SOURCE_LOG_FILE='<master_log_file>,
161159
SOURCE_LOG_POS=<master_log_pos>
160+
```
162161
163162
- master_host: hostname of the source server (example – 'source.mysql.database.Azure.com')
164163
- master_user: username for the source server (example - 'syncuser'@'%')
@@ -190,7 +189,7 @@ Restore the dump file to the server created in the Azure Database for MySQL Flex
190189
If the replica server is hosted in an Azure VM, set **Allow access to Azure services** to **ON** on the source to allow the source and replica servers to communicate. This setting can be changed from the connection security options. For more information, visit [Manage firewall rules using the portal](how-to-manage-firewall-portal.md).
191190

192191
If you used mydumper/myloader to dump the database, you could get the master_log_file and master_log_pos from the /backup/metadata file.
193-
192+
194193
## Next step
195194

196195
- Learn more about [Data-out replication](concepts-data-out-replication.md)

0 commit comments

Comments
 (0)