Troubleshooting FAQ for MySQL in-app
1. I cannot to access the database using Phpmyadmin
When you access PHPmyadmin for MySQL in-app and the page returns a login page or “cannot connect: invalid settings” error. There can be two causes for this issue:- MySQL process may not be running.
- You have two instances of PHPmyadmin installed
- PHPmyadmin folder exists in D:\home\siteextensions folder
- web app is using MySQL in-app feature
- There may be a connection strings in application settings.
- File server storage is in read only mode Click here to learn more
2. My application cannot connect to MySQL in-app database
If your web app is unable to connect to MySQL in-app database, it could result from :- MySQL process is not running for your application: You can access the process explorer in the portal. Select your web app -> Tools -> Process explorer. There will be exe process visible in the process explorer. If the process mysqld.exe is not visible in the process explorer, then restart the web app and browse the web app. Now check process explorer again to verify mysqld.exe loads and check if your web app is functioning correctly.
- Your web app is not configured correctly to use MySQL in-app: MySQL in-app does not use port 3306 for MySQL server and hence DO NOT hard code the database information in your application configuration file. If the MySQL port used by your web app as using in not available during the situations mentioned below, the MySQL port will change:during an upgrade of azure app service
- when your web app is scaled up/down
- when your app is moved to a different app service plan
- when you migrate your app from one subscription to another subscription
3. I cannot import my database with PHPmyadmin
PHPmyadmin allows your to import a database , but this may fail due to:- MySQL server used when exporting the database is different than the MySQL version used in MySQL in-app and the schema changes are not supported in the version of destination MySQL server.The version on MySQL in-app is 5.7.9.0. You verify this check by checking the version number folder in MySQL folder "D:\Program Files (x86)\mysql\5.7.9.0"
- PHPmyadmin version used for exporting the database varies with PHPmyadmin version used to import the database schema. The PHPmyadmin version that is used with MySQL in-app is 4.5.1. During export make sure the schema is supported. A workaround is to use mysqlimport.exe found in D:\Program Files (x86)\mysql\5.7.9.0\bin on the Kudu Debug console
"D:\Program Files (x86)\mysql\5.7.9.0\bin\mysql.exe" --user=azure --password=password --port=PORT --bind-address=127.0.0.1 DATABASE_NAME < exportedfile.sql
- The exported database file is greater than 8MB. PHPmyadmin is a php application , and the max_upload_size is 8MB for PHP on Azure app service. You can either modify the max_upload_size to your desired value before doing an import as per instructions mentioned here or use mysql utilities in Kudu debug console to do the import with this sample command
"D:\Program Files (x86)\mysql\5.7.9.0\bin\mysql.exe" --user=azure --password=password --port=PORT --bind-address=127.0.0.1 DATABASE_NAME < exportedfile.sql
4. I cannot write to the database OR I cannot create a comment or post on WordPress application
Turn on PHP error logs and if the error log states that the "InnoDB is in read only mode". This means file server storage is in READ ONLY mode , note that the file server is shared by your web app and MySQL database. The file server can be in read only mode due to
- an upgrade on the service : Once the upgrade is completed you should be able to write to the database. This usually does not take more than a few minutes.
- Platform issues : Check the Azure status to see if there are any ongoing issues that could be resulting in this.
- Network blips : This could impact the site for a couple of seconds if there was network connection loss.