@PeterT94 Thanks for reaching here! If you want to connect an App Services Web app to an Azure Database for MySQL - Flexible Server in a virtual network you need to follow below steps.
- Create a virtual network and a subnet for the web app and the database server.
- Create an Azure Database for MySQL - Flexible Server instance and configure it to use the subnet.
- Create an App Services Web app and configure it to use the subnet and the regional VNet integration feature.
- Update the web app's connection string to point to the database server's hostname and credentials.
- Test the connection from the web app to the database server using tools like MySQL Workbench or Azure Data Studio.
For more details suggest you refer this detailed article- Tutorial: Connect an App Services Web app to an Azure Database for MySQL - Flexible Server in a virtual network
Hope this helps, Let us know if further query or issue remains.