Skip to content

Commit 36d1366

Browse files
committed
fixed tabs issue and list issue
1 parent 8fb4476 commit 36d1366

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ The results should appear similar to the following. Make sure to note the binary
145145
146146
<-----------Content here----------->
147147
148+
---
149+
148150
## Dump and restore the source server
149151
150152
1. Determine which databases and tables you want to replicate into Azure Database for MySQL Flexible Server and perform the dump from the source server.

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

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,31 @@ The following steps prepare and configure the Azure Database for MySQL Flexible
3434

3535
1. **Networking Requirements**
3636

37-
Ensure that your network settings are established so that source and replica server can communicate seamlessly.
38-
If the source server is on public access, then ensure that firewall rules allow the replica server IP address. If the replica server is hosted on Azure, please ensure that you select the option of allowing public access from any Azure service from the networking page in the Azure portal.
39-
If the source server is on private access, ensure that the replica server can connect to the source through Vnet peering or a VNet-to-VNet VPN gateway connection.
40-
37+
Ensure that your network settings are established so that source and replica server can communicate seamlessly.
38+
If the source server is on public access, then ensure that firewall rules allow the replica server IP address. If the replica server is hosted on Azure, please ensure that you select the option of allowing public access from any Azure service from the networking page in the Azure portal.
39+
If the source server is on private access, ensure that the replica server can connect to the source through Vnet peering or a VNet-to-VNet VPN gateway connection.
40+
4141
> [!NOTE]
4242
> For more information - [Networking overview - Azure Database for MySQL Flexible Server](concepts-networking.md).
4343
4444
1. **Turn on binary logging**
4545

46-
Check to see if binary logging has been enabled on the source by running the following command:
47-
SHOW VARIABLES LIKE 'log_bin';
48-
If the variable log_bin is returned with the value "ON", binary logging is enabled on your server.
49-
46+
Check to see if binary logging has been enabled on the source by running the following command:
47+
48+
```sql
49+
SHOW VARIABLES LIKE 'log_bin';
50+
```
51+
52+
If the variable log_bin is returned with the value 'ON', binary logging is enabled on your server.
53+
5054
1. **Create a new replication role and set up permission**
5155

52-
Create a user account on the configured source server with replication privileges. This can be done through SQL commands or a tool such as 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/user-names.html) on your source server.
53-
54-
In the following commands, the new replication role can access the source from any machine, not just the one that hosts the source itself. This is done by specifying "syncuser@'%'" in the create user command. See the MySQL documentation to learn more about [setting account names](https://dev.mysql.com/doc/refman/5.7/en/account-names.html).
55-
56-
There are a few tools you can use to set account names. Select the one that best fits your environment.
57-
56+
Create a user account on the configured source server with replication privileges. This can be done through SQL commands or a tool such as 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/user-names.html) on your source server.
57+
58+
In the following commands, the new replication role can access the source from any machine, not just the one that hosts the source itself. This is done by specifying "syncuser@'%'" in the create user command. See the MySQL documentation to learn more about [setting account names](https://dev.mysql.com/doc/refman/5.7/en/account-names.html).
59+
60+
There are a few tools you can use to set account names. Select the one that best fits your environment.
61+
5862
#### [SQL Command](#tab/command-line)
5963

6064
**Replication with SSL**
@@ -111,6 +115,8 @@ The results should appear similar to the following. Make sure to note the binary
111115

112116
<-----------Content here----------->
113117

118+
---
119+
114120
## Dump and restore the source server.
115121

116122
Skip this section if it's a newly created source server with no existing data to migrate to the replica. You can, at this point, unlock the tables:
@@ -137,7 +143,7 @@ After dumping the database, change the source MySQL server to read/write mode.
137143
Restore the dump file to the server created in the Azure Database for MySQL Flexible Server service. Refer to Dump & Restore for restoring 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 Flexible Server server from the virtual machine.
138144

139145
> [!NOTE]
140-
> If you want to avoid setting the database to read-only when you dump and restore, you can use [mydumper/myloader](../migrate/concepts-migrate-mydumper-myloader).
146+
> If you want to avoid setting the database to read-only when you dump and restore, you can use [mydumper/myloader](../migrate/concepts-migrate-mydumper-myloader.md).
141147
142148
## Configure the replica server to start Data-out replication.
143149

@@ -169,7 +175,7 @@ Restore the dump file to the server created in the Azure Database for MySQL Flex
169175
START REPLICA;
170176
```
171177

172-
At this point, the replica instance begins replicating any changes made to the source server database. You can test this by creating a sample table on your source database and checking whether it gets replicated successfully.
178+
At this point, the replica instance begins replicating any changes made to the source server database. You can test this by creating a sample table on your source database and checking whether it gets replicated successfully.
173179

174180
1. Check replication status.
175181

@@ -181,10 +187,10 @@ At this point, the replica instance begins replicating any changes made to the s
181187

182188
If the state of Slave_IO_Running and Slave_SQL_Running are `yes` and the value of Seconds_Behind_Master is `0`, replication is working well. Seconds_Behind_Master indicates how late the replica is. The replica is processing updates if the value isn't `0`.
183189

184-
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).
185-
186-
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.
187-
190+
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).
191+
192+
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+
188194
## Next step
189195

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

0 commit comments

Comments
 (0)