Azure deployed Linux VM mysql port not accessible

FarooqK 1 Reputation point
2022-05-17T07:20:25.463+00:00

I have a Centos 7 deployed vm on azure, also deployed mysql on it and would like to access it remotely.

I also opened the port as show below:
202598-image.png

but I still can not access the port 3306, below screenshot from telnet:
202665-image.png

please note that port 80, 22 and 443 are accessible.
I am out of ideas why would this not work. Please help.

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

8 answers

Sort by: Most helpful
  1. Manu Philip 16,986 Reputation points MVP
    2022-05-17T07:26:33.66+00:00

    First, make sure that Mysql is running well. service mysql status
    You can verify the port is accessible within the server locally

    telnet localhost 3306
    

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  2. FarooqK 1 Reputation point
    2022-05-17T21:18:43.607+00:00

    thanks for your response @Manu Philip - I tried the telnet you suggested and it looks like it works locally:
    202923-image.png

    but the problem persists where I can't reach to this port remotely, I hope you can help.

    0 comments No comments

  3. FarooqK 1 Reputation point
    2022-05-18T03:38:09.13+00:00

    @Prrudram-MSFT @vipullag-MSFT hopefully some insight from you.

    0 comments No comments

  4. Manu Philip 16,986 Reputation points MVP
    2022-05-18T03:47:51.467+00:00

    Looks like the “bind-address” to be modified to 0.0.0.0 from 127.0.0.1 to make sure that the mysql server will listening on all your VM's ips.
    Go to /etc/mysql/mysql.conf.d/mysqld.cnf and modify bind-address from 127.0.0.1 to 0.0.0.0
    Restart MySQL server systemctl restart mysql and try again


    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  5. FarooqK 1 Reputation point
    2022-05-18T04:40:04.787+00:00

    @Manu Philip - I had already tried the bind-address conf setting and this didn't help at all.
    203054-image.png

    0 comments No comments