If you’re setting up a WordPress site in an Azure Web App then an easy option for hosting the required MySQL database is to use the MySQL in app option of the Web App rather than setting up a new MySQL server. Though it’s worth noting that this isn’t very powerful and so shouldn’t be used production sites.

The MySQL database can be enabled in the Web App from the MySQL In App blade.

This image has an empty alt attribute; its file name is web-app-mysql-in-app-1024x438.png

Once enabled you can get the connection string to access this database either from the file D:\home\data\mysql\MYSQLCONNSTR_localdb.ini either by using an FTP browser such as WinSCP or by using the Kudu console.

In my case I wanted this database for use in a WordPress site but after the initial setup I forgot the admin password for the site and needed to reset it.

If you’re unable to reset the admin password for a WordPress site from “Lost your password” page (in my case because I hadn’t enabled the site to send emails) and you have access to the underlying MySQL database then you can go in and manually update your password.

The easiest way to access an in app MySQL database is by using the “Manage” button at the top of the blade which will launch a phpMyAdmin page, within this you should create a new SQL query in the localdb database and run the following command.

UPDATE wp_users SET user_pass= MD5('yourpassword') WHERE user_login='yourusername';
This image has an empty alt attribute; its file name is web-app-mysql-phpmyadmin-1024x382.png

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *