Hi, @virajpatil Thanks for providing additional information
• If you are able to connect with Azure VM but not with MySQL workbench, it could be a network configuration issue.
• A getaddrinfo failed in your app does point towards a mismatch with Hostname. The other possibility is that you have chosen private access connectivity and are connecting from outside the vnet without an express route or VPN
for more investigation if you have a support plan you may file a support ticket.
Regards
Geetha