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/flexible-server/concepts-data-in-replication.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,9 +55,8 @@ The parameter `replicate_wild_ignore_table` creates a replication filter for tab
55
55
- Binary log files on the source server shouldn't be purged before the replica applies those changes. If the source is Azure Database for MySQL, refer to how to configure binlog_expire_logs_seconds for [flexible server](./concepts-server-parameters.md#binlog_expire_logs_seconds) or [Single server](../concepts-server-parameters.md#binlog_expire_logs_seconds)
56
56
- If the source server has SSL enabled, ensure the SSL CA certificate provided for the domain has been included in the `mysql.az_replication_change_master` stored procedure. Refer to the following [examples](./how-to-data-in-replication.md#link-source-and-replica-servers-to-start-data-in-replication) and the `master_ssl_ca` parameter.
57
57
- Ensure that the machine hosting the source server allows both inbound and outbound traffic on port 3306.
58
-
- Ensure that the source server has a **public IP address**, that DNS is publicly accessible, or that the source server has a fully qualified domain name (FQDN).
59
-
- With public access, ensure that the source server has a public IP address, that DNS is publicly accessible, or that the source server has a fully qualified domain name (FQDN).
60
-
- With private access, ensure that the source server name can be resolved and is accessible from the VNet where the Azure Database for MySQL instance is running. (For more details, visit [Name resolution for resources in Azure virtual networks](../../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md)).
58
+
- With **public access**, ensure that the source server has a public IP address, that DNS is publicly accessible, or that the source server has a fully qualified domain name (FQDN).
59
+
- With **private access**, ensure that the source server name can be resolved and is accessible from the VNet where the Azure Database for MySQL instance is running. (For more details, visit [Name resolution for resources in Azure virtual networks](../../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md)).
Copy file name to clipboardExpand all lines: articles/mysql/flexible-server/how-to-data-in-replication.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,38 +171,34 @@ The results should appear similar to the following. Make sure to note the binary
171
171
172
172
You can use mysqldump to dump databases from your primary server. For details, refer to [Dump & Restore](../concepts-migrate-dump-restore.md). It's unnecessary to dump the MySQL library and test library.
173
173
174
-
1. Set source server to read/write mode.
174
+
2. Set source server to read/write mode.
175
175
176
176
After the database has been dumped, change the source MySQL server back to read/write mode.
177
177
178
178
```sql
179
179
SET GLOBAL read_only = OFF;
180
180
UNLOCK TABLES;
181
181
```
182
+
[!NOTE]
183
+
> Before the server is set back to read/write mode, you can retrieve the GTID information using global variable GTID_EXECUTED. The same will be used at the later stage to set GTID on the replica server
182
184
183
-
1. Restore dump file to new server.
185
+
3. Restore dump file to new server.
184
186
185
187
Restore the dump file to the server created in the Azure Database for MySQL - Flexible Server 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 - Flexible Server server from the virtual machine.
186
188
187
189
> [!NOTE]
188
190
> If you want to avoid setting the database to read only when you dump and restore, you can use [mydumper/myloader](../concepts-migrate-mydumper-myloader.md).
189
191
190
-
## Retrieve gtid information from the source server dump
192
+
## Set GTID in Replica Server
191
193
192
194
1. Skip the step if using bin-log position-based replication
193
195
194
196
2. GTID information from the dump file taken from the source is required to reset GTID history of the target (replica) server.
195
197
196
-
3. GTID information from the source server can be retrieved using the following statement:
197
-
198
-
```sql
199
-
show global variables like 'gtid_executed’;
200
-
UNLOCK TABLES;
201
-
```
202
-
4. Use this GTID information from the source to execute GTID reset on the replica server using the following CLI command:
198
+
3. Use this GTID information from the source to execute GTID reset on the replica server using the following CLI command:
203
199
204
200
```azurecli-interactive
205
-
az mysql flexible-server gtid reset --resource-group <resource group> --server-name <source server name> --gtid-set <gtid set from the source server> --subscription <subscription id>
201
+
az mysql flexible-server gtid reset --resource-group <resource group> --server-name <replica server name> --gtid-set <gtid set from the source server> --subscription <subscription id>
206
202
```
207
203
208
204
For more details refer [GTID Reset](/cli/azure/mysql/flexible-server/gtid).
0 commit comments