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
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.
18
18
@@ -111,10 +111,6 @@ The results should appear similar to the following. Make sure to note the binary
111
111
112
112
:::image type="content" source="media/how-to-data-out-replication/mysql-workbench-result.png" alt-text="Screenshot of results.":::
113
113
114
-
#### [Azure Data Studio](#tab/azure-data-studio)
115
-
116
-
<-----------Content here----------->
117
-
118
114
---
119
115
120
116
## 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
132
128
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.
133
129
134
130
1. Set the source server to read/write mode.
131
+
135
132
After dumping the database, change the source MySQL server to read/write mode.
136
133
137
134
```sql
@@ -153,12 +150,14 @@ Restore the dump file to the server created in the Azure Database for MySQL Flex
153
150
154
151
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:
155
152
153
+
```sql
156
154
CHANGE THE REPLICATION SOURCE TO
157
155
SOURCE_HOST='<master_host>',
158
156
SOURCE_USER='<master_user>',
159
157
SOURCE_PASSWORD='<master_password>',
160
158
SOURCE_LOG_FILE='<master_log_file>,
161
159
SOURCE_LOG_POS=<master_log_pos>
160
+
```
162
161
163
162
- master_host: hostname of the source server (example – 'source.mysql.database.Azure.com')
164
163
- 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
190
189
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
190
192
191
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
+
194
193
## Next step
195
194
196
195
- Learn more about [Data-out replication](concepts-data-out-replication.md)
0 commit comments