您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

在最短的停机时间内迁移到 Azure Database for MySQLMinimal-downtime migration to Azure Database for MySQL

可以使用为 Azure 数据库迁移服务 (DMS) 新引入的连续同步功能以最短停机时间执行 MySQL 到 Azure Database for MySQL 的迁移。You can perform MySQL migrations to Azure Database for MySQL with minimal downtime by using the newly introduced continuous sync capability for the Azure Database Migration Service (DMS). 此功能可限制应用程序引起的停机时间量。This functionality limits the amount of downtime that is incurred by the application.

概述Overview

DMS 将本地内容初始加载到 Database for MySQL,然后在应用程序仍在运行时不断地将任何新事务同步到 Azure。Azure DMS performs an initial load of your on-premises to Azure Database for MySQL, and then continuously syncs any new transactions to Azure while the application remains running. 在目标 Azure 端的数据已与本地端数据保持同步后,可暂停应用程序一段时间(最短停机时间),等待最后一批数据(从停止应用程序时起,直到应用程序实际不可用于接收任何新流量)同步到目标,然后更新连接字符串使其指向 Azure。After the data catches up on the target Azure side, you stop the application for a brief moment (minimum downtime), wait for the last batch of data (from the time you stop the application until the application is effectively unavailable to take any new traffic) to catch up in the target, and then update your connection string to point to Azure. 完成后,应用程序将在 Azure 上运行!When you are finished, your application will be live on Azure!

使用 Azure 数据库迁移服务进行连续同步

后续步骤Next steps