skip to Main Content

When attempting to connect to the Azure App Services (ASP.NET) MySQL database (Navigating to the Manage link) the Page info returned from PHPMyAdmin prevents me from moving forward. I cannot seem to find the location of the log for the app within Kudu and navigating to the MYSQLCONNSTR_*.ini file did not provide me with the information that I needed.

I’ve attempted to use the connection strings for the database for both the scm and the web app but neither work. I have also attempted to use the public-facing IP within the Kudu environment variable without any luck.

I cannot seem to find the information I need to connect to my instance of PHPMyAdmin, and am now quite lost.

2

Answers


  1. Chosen as BEST ANSWER

    The solution to my problem was here: https://stackoverflow.com/a/57545678/4212591

    The free tier of the Azure Web Service does not allow for the always-on feature. Thus my inability to connect to the service.


  2. I’m unsure on the exact location/path you are looking for that file, the connection string is stored at D:homedatamysqlMYSQLCONNSTR_localdb.txt.

    If you wish to customize the database, username and password, after you have created a new database, add new username or update password, simply modify:

    D:homedatamysqlMYSQLCONNSTR_localdb.ini , remove D:homedatamysqlMYSQLCONNSTR_localdb.txt and restart the WebApps.

    Furthermore, the connection string flows to your application as an env variable MYSQLCONNSTR_localdb. The env is added to the main site process. For Kudu site, one may read the same info from D:homedatamysqlMYSQLCONNSTR_localdb.txt file. Beware that we are not using the default MySql port (3306). In fact, the port number may vary for each application life cycle depending on its availability at startup time. The port info is also available as an env variable WEBSITE_MYSQL_PORT to your site.

    Ensure that MySQL process is running. Check in your web app application settings if there is a connection string. PHPmyadmin uses MYSQLCONNSTR_ to connect to the MySQL server. If you have a connection string in application setting change the connection string type to Custom , so you can still have the information if needed or delete it. This will force PHPmyadmin to access MYSQLCONNSTR_localdb and connect to the MySQL in-app server.

    As a side note, on Azure WebApps Sandbox – Connection attempts to local addresses (e.g. localhost, 127.0.0.1) and the machine’s own IP will fail, except if another process in the same sandbox has created a listening socket on the destination port.

    To rule out, application code or the client library leaking TCP socket handles or burst load of requests opening too many TCP socket connections at once, scale-up Azure App Service Plan and see if that makes any difference.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search