Connecting web app to mysql database

ZOUAOUI Sarra 11 Reputation points
2020-05-04T22:12:22.81+00:00

Hello, is it possible to connect an azure web app to an azure mysql database that is hosted on Azure Express (hybrid) ? because I see that the only possibility to do that is to get an Azure SQL database and not MySQL database

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,317 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
438 questions
Azure ExpressRoute
Azure ExpressRoute
An Azure service that provides private connections between Azure datacenters and infrastructure, either on premises or in a colocation environment.
177 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Alexander Beck 6 Reputation points Microsoft Employee
    2020-05-07T10:10:27.687+00:00

    Hey @ZOUAOUI Sarra ,

    from my perspective it looks like you want your Application, hosted in Azure App Service, to access some on prem resources, in your case a MySQL Server. The connection between your on prem environment and the cloud is already established via Azure Express Route and you also want to leverage the existing express route for your project.

    In order to connect an Azure Web App with another (non Azure PaaS Service) you usually need to work with some kind of vNet (virtual Azure Networks) integration. This allows you to "connect" your Azure App Service to a vNet.

    In your case I would suggest that you take a look at a feature which is called "Regional VNet Integration".

    Using regional VNet Integration enables your app to access:

    • Resources in a VNet in the same region as your app.
    • Resources in VNets peered to the VNet your app is integrated with.
    • Service endpoint secured services.
    • Resources across Azure ExpressRoute connections.
    • Resources in the VNet you're integrated with.
    • Resources across peered connections, which includes Azure ExpressRoute connections.
    • Private endpoints

    You will find a tutorial on how to set up this integration in the Documentation.

    I hope that helps!