Skip to content

Commit 3619dbc

Browse files
authored
Added Migration best practices
Added the section Preparing the target Azure Database for MySQL server for fast data loads Added reference to few important techcommunity blog produced by our field and CSS
1 parent 62309de commit 3619dbc

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
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).

0 commit comments

Comments
 (0)