How to open phpmyadmin on azure linux

Pascal 20 Reputation points

I installed lamp on azure vm but i cant open phpmyadin.I get this error when i try to connect using IP address i get this error "This site can’t be reached refused to connect.


  • Checking the connection
  • [Checking the proxy and the firewall]


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

Accepted answer
  1. Prrudram-MSFT 22,486 Reputation points


    We noticed that you rated an answer as not helpful. I have provided an answer with the relevant details to make this a positive experience for you. Thanks!

    We value your feedback. If my answer is helpful, would you be so kind to re-evaluate your feedback, accept my answer and upvote the same please?


    By default, only SSH connections are allowed into Linux VMs deployed in Azure. Because this VM is going to be a web server, you need to open port 80 from the internet. Use the az vm open-port command to open the desired port.

    You can refer to this document for details

    If I have answered your query, please click "Accept as answer" as a token of appreciation

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Deepanshu katara 5,370 Reputation points


    Here are some troubleshooting steps you can try:

    1. Check Apache and MySQL services: Ensure that Apache and MySQL services are running on your Azure VM. You can do this by SSH-ing into your VM and running commands like sudo systemctl status apache2 and sudo systemctl status mysql to check their statuses. If they're not running, start them using sudo systemctl start apache2 and sudo systemctl start mysql.
    2. If the website has been stopped and restarted you have to first connect to the website URL from a browser. Once you do that, the instance is running and you can connect to phpMyAdmin. It will launch without a login scree
    3. Ensure that PHP is installed and configured properly on your Azure VM. You can check the PHP configuration by creating a PHP file with <?php phpinfo(); ?> and accessing it via a web browser to see if PHP is running correctly.

    Kindly check and accept answer , if it helps, Thankyou

    0 comments No comments

  2. Dillon Silzer 54,746 Reputation points

    Hi Pascal,

    Ensure you have the necessary ports open on your Azure VM's Network Security Group (NSG):

    Go to the Resource Group > Find the NSG associated to the VM > go to Inbound security rules:

    User's image

    Ensure you have added a rule to allow port 80 and 443 (and any other port you may have configured on the server to allow traffic to the server).

    If this is helpful please accept answer.

    0 comments No comments

  3. Pascal 20 Reputation points

  4. Deepanshu katara 5,370 Reputation points

    Hi Pascal ,

    Issue --> How to open and access phpmyadmin on azure linux Machines

    Solution --> Please check and follow this ""


    0 comments No comments