Deleting a classic ClearDB MySQL database in Azure

Websites in Azure that require MySQL will be default provision them in an external service provider known as ClearDB.

This is slightly frustrating and surprising, given that MySQL can be run in Azure itself. I won’t go into how to do that as there are already a number of existing articles covering that topic.

What I could not find however was a clear and simple way to delete an existing MySQL database that was stored in ClearDB.

This is compounded further by the fact that if you created your web app using the classic Azure admin portal (ie. using instead of – the linked MySQL database won’t show up and therefore can’t be managed or upgraded.

The scenario is this: my blog site has been running for a number of years and the database had grown to capacity. Since I created it some time ago in the classic admin portal I had no way to upgrade the database as it wasn’t “connected” to my current Azure portal. I went around in loops between different processes and support cases, all to no avail. Long story short I had to create a new MySQL database in ClearDB (which I did this time through the modern Azure admin portal), migrate the database, modify the wp-config.php of my WordPress site to point to the new database, and away we went.

Unfortunately, I was still getting emails on a daily basis from ClearDB telling me that the original database was at capacity. Logging into the ClearDB portal I could not see any way to delete the database (literally, there is no delete button or any other management option).

Raising a case with ClearDB to delete the database was no help as they just kept pointing back to Microsoft as the billing source and said I had to delete it from there – which is not a possibility.

So I found a simple and quick workaround to delete the database.

What we know

When deleting a web app in the classic Azure admin portal gives you the option to delete the linked MySQL database:

If we expand the warning we see this:

What we need to do

Create a new web app with any free name:

Once it’s completed, browse to Linked Resources, then Link a resource:

Select Link an Existing Resource:

Then select MySQL Database:

Specify the database from the drop-down:

Accept the terms, press the big tick button, and linking should be completed within a few second. What you should see is something like this:

So now we can proceed with deleting the app and select the attached database:

Browsing back to your ClearDB account you should now see the “deleted” database, now with different information but most importantly a Delete button (NOTE: database in below screenshot is different from previous screenshots):

Hit that Delete button and you’re done, this whole frustrating experience with ClearDB is now behind you!

Also published on Medium.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: