Issue with Azure App Service while deploying Web Service (PHP with MySQL)

Error_401 86 Reputation points
2021-04-14T11:51:50.92+00:00

I'm new to Azure App Service.

I want to run a WebPage, I'm using PHP and MySQL as backend. Everything is working fine for me when I'm running local but my task is to connect the database residing in a remote server. I have created a VM in Azure and installed XAMP, now I'm trying to connect the MySQL in that remote server with the Azure "MySQL in App" but every time I connect I get the error "MySQL in App import failed"

87678-image.png

NOTE - I'm not using the root account - a proper account with a password has been configured in MySQL, also note that XAMP uses port 3306 for MySQL and that is opened in the networking part of that VM so there is no issue in VM.

Please let me know if you need more information. I need a solution ASAP,

Thanks

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,320 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
440 questions
No comments
{count} votes

Accepted answer
  1. Ryan Hill 16,076 Reputation points Microsoft Employee
    2021-04-14T19:41:41.06+00:00

    Hi @Error_401 ,

    It sounds like your mixing IaaS, the deployed VM, with PaaS, Azure App Service. MySQL InApp; which you can read more about here, is an offering meant for quickly testing/troubleshooting your application before moving to production workloads. Since MySQL In-App is scaled down local database, connecting to it is done in the app service through various dynamically created application settings; it doesn't use 3306.

    I can't speak on XAMPP, but you can follow https://learn.microsoft.com/en-us/azure/app-service/tutorial-php-mysql-app?pivots=platform-linux tutorial on creating a PHP app backed by MySQL Azure instance. You can leverage the MySQL In-App to perform all your testing and then export the schema to a MySQL Azure instance.

    Regards,
    Ryan


0 additional answers

Sort by: Most helpful