Search code examples
mysqlsql-serverazure-sql-databaseazure-database-mysql

How to connect Azure Database for MySQL flexible server in Azure SQL Server Database


I am trying to set up a connection between Azure MySQL flexible server and Azure SQL database mainly to read data from MySQL and store it in the SQL Server periodically (multiple times a day).

I was thinking of creating a stored procedure inside my SQL Server database; however, I cannot seem to get a connection from the SQL Server into the MySQL database. I know with ODBC you can connect MySQL to on-prem SQL Server, but unfortunately, there is nothing I have found for the same functionality for Azure SQL Server.

Has anyone done this? Is this possible?

I have tried to set up an ODBC connection, but it did not work as the SQL Server is on Azure.

I tried setting up a linked server inside SQL Server straight to MySQL, but it doesn't seem possible as the SQL Server is not on-prem.

I tried creating external database objects based on the following link.

With all these approaches, my expectation was to surface the MySQL tables from Azure SQL Server/SSMS.

Thank you for your help in advance!


Solution

  • I have had to create an Azure Function App that contains a Timer function that reads the data from the MySQL data and pushes it to SQL Server every 15 minutes (as were the requirements).

    Thank you for everyone for commenting.