question

LeightonFernandes avatar image
0 Votes"
LeightonFernandes asked JonathanHardy-3981 published

Data Replication from on-Prem MySQL to Azure Database for MySQL

Hi.

We have a onPrem mySQL database that is on a non-public (private endpoint). We would like to replicate the data in this DB to Azure.

I have tried using a Azure database for mySQL but this did not work presumably because of the following perquisite.

from : https://docs.microsoft.com/en-us/azure/mysql/concepts-data-in-replication#limitations-and-considerations
Ensure the the source server has a public IP address, the DNS is publicly accessible, or has a fully qualified domain name (FQDN).

Any suggestion on how i can go about doing this. i have an ExpressRoute setup between the onPrem and Azure Resource group.
Is this possible to do with Azure database for MySQL ? does this require any additional network config? will single server work or do i need to try flexible server.

As a last option i can consider installing mySQL on a Azure VM that is on a private network but this is not the preferred route. hence the question.

Any suggestions would be very much appreciated

azure-database-mysql
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AnuragSharma-MSFT avatar image
0 Votes"
AnuragSharma-MSFT answered

hi @LeightonFernandes, welcome to Microsoft Q&A forum.

You are right in mentioning the primary requirement as it says "Ensure that the source server allows both inbound and outbound traffic on port 3306, and that it has a public IP address, the DNS is publicly accessible, or has a fully qualified domain name (FQDN)."

However, I would suggest you to go through the below doc which talks about DMS for migration from MySQL to Azure Database for MySQL using ExpressRoute or VPN:

Tutorial: Migrate MySQL to Azure Database for MySQL online using DMS

Please let us know if this helps.


If answer helps, please mark it as 'Accept Answer'




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LeightonFernandes avatar image
0 Votes"
LeightonFernandes answered JonathanHardy-3981 published

hi Anurag,

Thanks for your reply.

I have looked up DMS and the link you have shared below. However our use case is not to migrate/replicate the database as a one time activity. We are looking to set up continuous replication where the master database (MySQL) is replicated on a near real time basis to Azure.

Do you think it would be possible to achieve the same (i.e. continuous replication) using DMS?


Thanks
Leighton

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @LeightonFernandes, thanks for replying back.

To answer your query, yes as long as we have DMS not removed from subscription we can keep on executing it by selecting respective databases. However it cannot be scheduled, so someone has to manually trigger it. Hope it helps.

0 Votes 0 ·

Hi Anurag.
Once again thanks for your response.

However what we are looking is continuous log based replication which is automatically triggered where the data is replicated instantaneously. So I don't think this would be achievable using DMS. Thanks for your help though.

It looks like the only option is to use IaaS (MySQL installed on an Azure VM where the VM is connected to the on prem network through ExpressRoute) and then to leverage the inbuilt functionality of MySQL for data replication. We will probably trial this approach.

Thanks for your help

Regards
Leighton

1 Vote 1 ·

Leighton, it looks like this was released barely a month after your last comment. I believe it aligns with what you're trying to do:

https://docs.microsoft.com/en-us/azure/mysql/howto-data-in-replication

0 Votes 0 ·