As I understand from your scenario description that you are wanting to establish a private connection between your WebApp, both WebApp and Azure Database for MySQL are on the same VNET, with Private DNS zone.
I understand you have mentioned, “assigned it an own subnet”. Just to clarify, are they both on same subnet or different?
You now need to have subnet that is delegated to App Service Web App endpoint. You may create a new subnet in the same virtual network as the database server was created. Please see the doc steps.
If you haven’t done this already, create a DNS record in the private DNS zone for the MySQL server.
(You may do this by going to the "Private DNS zones" blade in the Azure portal. Create a new DNS record and specify the name of the MySQL server and the private IP address of the private endpoint.)
Update the connection string for the Web App to use the private endpoint.
(You may do this by updating the connection string in the Web App's configuration settings to use the private endpoint DNS name instead of the public DNS name)
Your MySQL flexible server must be in a subnet that is delegated for MySQL flexible server use only.
Please checkout these docs for more info:
- Connect an existing Azure App Service to Azure Database for MySQL server
- Tutorial: Connect an App Services Web app to an Azure Database for MySQL - Flexible Server in a virtual network
Kindly let us know how it goes, I’ll be happy to follow-up with you further.