Skip to content

Commit 6f44afd

Browse files
authored
Merge pull request #115813 from savjani/master
Added Migration best practices
2 parents 85fc39a + 56fdd2f commit 6f44afd

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

articles/mysql/concepts-migrate-dump-restore.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ To step through this how-to guide, you need to have:
1919
- [mysqldump](https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html) command-line utility installed on a machine.
2020
- MySQL Workbench [MySQL Workbench Download](https://dev.mysql.com/downloads/workbench/) or another third-party MySQL tool to do dump and restore commands.
2121

22+
If you are looking to migrate large databases with database sizes more than 1 TBs, you may want to consider using community tools like mydumper/myloader which supports parallel export and import. Parallel dump and restore can help significantly reduce migration time for large databases. You can refer to our [techcommunity blog](https://techcommunity.microsoft.com/t5/azure-database-for-mysql/best-practices-for-migrating-large-databases-to-azure-database/ba-p/1362699) for best practices for migrating large databases to Azure Database for MySQL service using mydumper/myloader tools.
23+
2224
## Use common tools
2325
Use common utilities and tools such as MySQL Workbench or mysqldump to remotely connect and restore data into Azure Database for MySQL. Use such tools on your client machine with an internet connection to connect to the Azure Database for MySQL. Use an SSL encrypted connection for best security practices, see also [Configure SSL connectivity in Azure Database for MySQL](concepts-ssl-connection-security.md). You do not need to move the dump files to any special cloud location when migrating to Azure Database for MySQL.
2426

@@ -85,6 +87,16 @@ Add the connection information into your MySQL Workbench.
8587

8688
![MySQL Workbench Connection String](./media/concepts-migrate-dump-restore/2_setup-new-connection.png)
8789

90+
## Preparing the target Azure Database for MySQL server for fast data loads
91+
To prepare the target Azure Database for MySQL server for faster data loads, the following server parameters and configuration needs to be changed.
92+
- max_allowed_packet – set to 1073741824 (i.e. 1GB) to prevent any overflow issue due to long rows.
93+
- slow_query_log – set to OFF to turn off the slow query log. This will eliminate the overhead caused by slow query logging during data loads.
94+
- query_store_capture_mode – set both to NONE to turn off the Query Store. This will eliminate the overhead caused by sampling activities by Query Store.
95+
- innodb_buffer_pool_size – Scale up the server to 32 vCore Memory Optimized SKU from the Pricing tier of the portal during migration to increase the innodb_buffer_pool_size. Innodb_buffer_pool_size can only be increased by scaling up compute for Azure Database for MySQL server.
96+
- innodb_write_io_threads & innodb_write_io_threads - Change to 16 from the Server parameters in Azure portal to improve the speed of migration.
97+
- Scale up Storage tier – The IOPs for Azure Database for MySQL server increases progressively with the increase in storage tier. For faster loads, you may want to increase the storage tier to increase the IOPs provisioned. Please do remember the storage can only be scaled up, not down.
98+
99+
Once the migration is completed, you can revert back the server parameters and compute tier configuration to its previous values.
88100

89101
## Restore your MySQL database using command-line or MySQL Workbench
90102
Once you have created the target database, you can use the mysql command or MySQL Workbench to restore the data into the specific newly created database from the dump file.
@@ -95,7 +107,6 @@ In this example, restore the data into the newly created database on the target
95107
```bash
96108
$ mysql -h mydemoserver.mysql.database.azure.com -u myadmin@mydemoserver -p testdb < testdb_backup.sql
97109
```
98-
99110
## Export using PHPMyAdmin
100111
To export, you can use the common tool phpMyAdmin, which you may already have installed locally in your environment. To export your MySQL database using PHPMyAdmin:
101112
1. Open phpMyAdmin.
@@ -114,6 +125,9 @@ Importing your database is similar to exporting. Do the following actions:
114125
5. Use the **browse** button to find the database file.
115126
6. Click the **Go** button to export the backup, execute the SQL commands, and re-create your database.
116127

128+
## Known Issues
129+
For known issues, tips and tricks, we recommend you to look at our [techcommunity blog](https://techcommunity.microsoft.com/t5/azure-database-for-mysql/tips-and-tricks-in-using-mysqldump-and-mysql-restore-to-azure/ba-p/916912).
130+
117131
## Next steps
118132
- [Connect applications to Azure Database for MySQL](./howto-connection-string.md).
119133
- For more information about migrating databases to Azure Database for MySQL, see the [Database Migration Guide](https://aka.ms/datamigration).

articles/mysql/concepts-read-replicas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ However, there are limitations to consider:
5656

5757
If a master server has no existing replica servers, the master will first restart to prepare itself for replication.
5858

59-
When you start the create replica workflow, a blank Azure Database for MySQL server is created. The new server is filled with the data that was on the master server. The creation time depends on the amount of data on the master and the time since the last weekly full backup. The time can range from a few minutes to several hours.
59+
When you start the create replica workflow, a blank Azure Database for MySQL server is created. The new server is filled with the data that was on the master server. The creation time depends on the amount of data on the master and the time since the last weekly full backup. The time can range from a few minutes to several hours.The replica server is always created in the same resource group and same subscription as the master server. If you want to create a replica server to a different resource group or different subscription, you can [move the replica server](https://docs.microsoft.com/azure/azure-resource-manager/management/move-resource-group-and-subscription) after creation.
6060

6161
Every replica is enabled for storage [auto-grow](concepts-pricing-tiers.md#storage-auto-grow). The auto-grow feature allows the replica to keep up with the data replicated to it, and prevent an interruption in replication caused by out-of-storage errors.
6262

articles/mysql/howto-read-replicas-portal.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ A read replica server can be created using the following steps:
4747
7. Select **OK** to confirm creation of the replica.
4848

4949
> [!NOTE]
50-
> Read replicas are created with the same server configuration as the master. The replica server configuration can be changed after it has been created. It is recommended that the replica server's configuration should be kept at equal or greater values than the master to ensure the replica is able to keep up with the master.
50+
> Read replicas are created with the same server configuration as the master. The replica server configuration can be changed after it has been created. The replica server is always created in the same resource group and same subscription as the master server. If you want to create a replica server to a different resource group or different subscription, you can [move the replica server](https://docs.microsoft.com/azure/azure-resource-manager/management/move-resource-group-and-subscription) after creation. It is recommended that the replica server's configuration should be kept at equal or greater values than the master to ensure the replica is able to keep up with the master.
5151
5252
Once the replica server has been created, it can be viewed from the **Replication** blade.
5353

@@ -133,4 +133,4 @@ To delete a master server from the Azure portal, use the following steps:
133133

134134
## Next steps
135135

136-
- Learn more about [read replicas](concepts-read-replicas.md)
136+
- Learn more about [read replicas](concepts-read-replicas.md)

0 commit comments

Comments
 (0)