I recently moved my blog to use WordPress hosted on Azure. So far the experience has been pretty good. However, I ran into a snag this weekend. I would have really been in trouble had I not read a recent blog post by John Papa about similar problems. Luckily, my situation was not quite as bad as John’s.

I was uploading a new post to my blog from Windows Live Writer and I got an error. I didn’t grab the details of the error but it was clear that Live Writer wasn’t able to post to my blog. I switched over and logged directly into my blog’s WordPress admin site. I did a quick test to see if I could save any data and of course, I could not. Having just read John’s post, my first instinct was that I was hitting the database limit of 20MB imposed by ClearDB as part of the free service (they have a partnership with Azure).

Still, I needed to figure out for sure what was causing the issue and resolve it. Mind you, at this point, my blog was still running and I think that unless someone tried to post a comment, no one aside from me would know there was a problem.


imageI opened my Azure Portal and quickly was able to find a good place to start. On the right side there is a collection of links for a variety of things. Towards the bottom there was a link for diagnostic logs. I opened the file and quickly found a bunch of messages similar to this:

WordPress database error: [INSERT,UPDATE command denied to user ‘xxxxxx’@’xxxxxx’ for table xxxxx]

That was the same message that I read about on John Papa’s blog so I was now pretty certain that I had reached the space limit. I wasn’t too keen on upgrading my ClearDB account just yet, that would mean that I’d have to pay for the service that I was hoping to use for free. Sorry ClearDB, no offense! Was there any way I could clear out some data and go below the 20MB threshold? I knew that I had a LOT of spam messages that had not been deleted so I tried to clear them through the WordPress UI. At first I was surprised that I could delete them but of course the error message doesn’t say anything about delete command being denied. I removed the spam but I still could not add any new content. Oh well, it was worth a shot. Maybe I was still over the 20MB limit?

I found another great post on CodeThug.com that explained how to connect to my database with MySql Workbench and figure out the size of my database. In order to connect, you’ll need your DB connection info. The credentials are NOT your Azure portal credentials. Again, Azure has a link (see the screenshot) that says “View connection strings”. You’ll find what you need right there. After checking, I found that I was only using 12.5 MB! Wow, that means I removed a LOT of spam. I’ll certainly need to be more vigilant about that in the future (maybe I’ll auto delete spam).

Next I logged in to ClearDB using the credentials from my Azure connection string. After adding some additional information, I completed the creation of my ClearDB account. I then created a help ticket explaining my situation (in short, I told them I was locked out but currently using far less than 20MB). ClearDB responded very quickly and enabled my account. I was back in action. Incidentally, ClearDB support informed me that the account locks when you hit 20MB and does not automatically enable itself when you delete data. In spite of the problem, I was pretty impressed with ClearDB’s rapid response. That makes me feel good about the fact that soon enough I will have to upgrade my account with them and pay them money. At least I know they have first class customer support.

I’d also like to echo a few points made by John Papa in his blog post. I’d really like to have had more information up front about this. I had no idea that my db was hosted on ClearDB and that there was a 20MB limit. I had no idea that I was near the 20 MB limit. If I had known that I was close, I could have easily removed the spam before getting locked out.

In the end, this wasn’t too tough to resolve but if I hadn’t had read about John’s issue just two weeks ago, I think this would have been a much more difficult situation.

4 thoughts on “WordPress Database Error on Azure

  1. Pingback: Reading Notes 2013-01-21 | Matricis

  2. Thanks for posting this. I recently moved over to WordPress on Azure Web Sites as well. I saw John’s post about running out of room. I’ve not run out of room yet, but I’m certain I will at some point. Thanks for posting this additional information as a point of reference.

  3. Pingback: Dew Drop – January 15, 2013 (#1,480) | Alvin Ashcraft's Morning Dew

Leave a reply


<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>