Hello,
If you go to your Virtual Machine in Azure > Networking
Go to Add inbound port rule
Change Source to IP Addresses > Add your Public IP address in Source IP addresses/CIDR ranges
Change Service to Custom and Destination port ranges to 3306 and choose TCP - Allow
Click Add.
If this is helpful please accept answer.