I run MariaDB on Azure VM, I can't connect port 3306 outside from Azure

nikeda 1 Reputation point
2023-01-28T03:20:25.0833333+00:00

I run MariaDB on Azure VM, I can't connect port 3306 outside from Azure.

I open port 3306 by Network Security Group.

And I confirm VM listen port 3306.

And I open port 3306 by Network Security Group.

Any other point?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,103 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dillon Silzer 54,291 Reputation points
    2023-01-28T04:55:15.7466667+00:00

    Hello,

    If you go to your Virtual Machine in Azure > Networking

    User's image

    Go to Add inbound port rule

    User's image

    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

    User's image

    Click Add.


    If this is helpful please accept answer.


  2. srbhatta-MSFT 8,546 Reputation points Microsoft Employee
    2023-02-02T06:15:16.18+00:00

    Hello @nikeda ,

    Could you please check if there is any firewall rule within your VM (MariaDB server) that is blocking incoming requests on port 3306?

    You can also try doing a telnet to port 3306 and check if the connection is going through.

    If it is, then you probably will have to check the MariaDB configuration settings. Do let me know. Thank you.

    0 comments No comments