Hi @Viktor Opara,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
As i understand that, you would like to verify your application and the MySQL server configuration in order to use VNet and private DNS. Also need to fix ENOTFOUND error.
To verify that both your application and the MySQL server are correctly configured to use the same VNet and private DNS, you can perform the following steps:
- Check the VNet configuration: Ensure that both your application and the MySQL server are deployed in the same VNet. You can check the VNet configuration in the Azure portal or using the Azure CLI.
- Check the private DNS configuration: Ensure that both your application and the MySQL server are configured to use the same private DNS zone. You can check the private DNS configuration in the Azure portal or using the Azure CLI.
- Check the DNS resolution: Verify that the DNS name of the MySQL server is resolving correctly from your application. You can use the 'nslookup' command to check the DNS resolution, run the following command from your application server. nslookup <your-server-name>.mysql.database.azure.com
I would request you to refer the below mentioned links:
https://zcusa.951200.xyz/en-us/windows-server/networking/dns/troubleshoot/troubleshoot-dns-server
https://zcusa.951200.xyz/en-us/azure/mysql/flexible-server/concepts-networking-vnet
https://zcusa.951200.xyz/en-us/windows-server/administration/windows-commands/nslookup
Check the firewall rules: Ensure that the firewall rules for the MySQL server allow traffic from the application server. You can check the firewall rules in the Azure portal or using the Azure CLI.
If you are still experiencing the ENOTFOUND error after verifying the VNet, private DNS, DNS resolution, and firewall rules, you may need to check the application configuration to ensure that it is correctly configured to connect to the MySQL server. You may also need to check the MySQL server logs for any error messages that could provide more information about the issue.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.