Jul 122012
 

A while back, I ran into a problem with WordPress, the blogging software that I use. I was unable remove posts from categories. In particular, blog posts that were not explicitly added to any category were automatically added to the “Uncategorized” category; it was impossible to remove them afterwards even as I added categories to the post. Unchecking a category made no difference.

Now I know why. For some reason, the WordPress account on my MySQL server lost table lock and (more importantly) delete privileges.

USE mysql;
UPDATE db SET Delete_priv='Y' WHERE User='wordpress' AND Delete_priv='N';
UPDATE db SET Lock_tables_priv='Y' WHERE User='wordpress' AND Lock_tables_priv='N';
FLUSH PRIVILEGES;

I really like it when I am able to resolve a long-standing problem with such little hassle. I just hope that this privileges issue did not corrupt the database in other ways, causing grief later on.

 Posted by at 1:28 pm