How do I access my PHPMyAdmin Account and my SQL database on my Azure App Service portal?

KM 0 Reputation points
2023-07-19T12:39:50.06+00:00

I have created my WordPress site on Azure App Service on Linux with a Flexible MySQL Azure Database by following the Microsoft document at https://learn.microsoft.com/en-us/azure/app-service/quickstart-wordpress?wt.md_id=searchAPI_azureportal_inproduct_rmskilling&sessionId=19219dd720cc4cbf970791f07139bdf4. To migrate my existing WordPress site to the Azure instance, I used the all-in-one plugin. However, when I tried to access my PHPMyAdmin account and find my SQL database on the Azure App Service Portal, I faced multiple issues.

I referred to https://azure.github.io/AppService/2016/09/08/Troubleshooting-FAQ-for-MySQL-in-app.html but the "MySQL-in-app" and "Process Explorer" buttons are not on my portal.

When I tried to access "<mywebsitename.azurewebsites.net>/phpymyadmin," it showed a login form asking for the database username and password from my app configuration settings. However, it gave me a "403 - You don't have authorization to view this page" error after submitting the credentials.

I also tried accessing "<mywebsitename>.scm.azurewebsites.net/phpmyadmin", but it returned a "No route registered for '/phpmyadmin'" error.

Can anyone help me resolve this issue and access my PHPMyAdmin account and SQL database on the Azure App Service Portal? Thank you in advance for your assistance!

Azure SQL Database
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,937 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2023-07-21T18:28:49.7666667+00:00

    The "MySQL-in-app" feature is only available for Windows-based Azure App Service plans. This feature won't be available since you are using a Linux-based Azure App Service. Instead, you need to use a separate MySQL database, which you have already set up as a Flexible MySQL Azure Database.

    It would be best if you started PHPMyAdmin. Would you please try this command:

    phpmyadmin --host=localhost --user=<your-database-username> --password=<your-database-password>
    
    

  2. brtrach-MSFT 17,731 Reputation points Microsoft Employee Moderator
    2023-08-02T21:31:29.67+00:00

    @KM To expand upon the great answers by Vahid, you can try running the command I provided in the Bash console in Kudu. If it says "phpmyadmin: command not found", it's possible that PHPMyAdmin is not installed on your Azure App Service.

    Regarding the "403 - You don't have authorization to view this page" error, it's possible that it's caused by a firewall or networking setting. However, it's also possible that it's caused by incorrect credentials. Please double-check that you're using the correct database username and password in the login form.

    If you're still having trouble accessing PHPMyAdmin, you can try redeploying your app and ensuring that PHPMyAdmin is properly configured to work with your MySQL Azure Database. If the issue persists, please let me know and we can explore other solutions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.