My wife discovered that the categories in her blog were missing. When I got the “Could not insert” msg, I tried my blog (different WP database on the same server). Same problem there.
I Googled and found this topic.
I checked against DataBase description and found that
_term_relationships,_term_taxonomy and _terms were missing.
I checked another server I manage, and those tables were present.
Both servers are running WP 2.5.1 on Fedora 9. The only significant difference, IMO, is that the server without problems is using the ‘wordpress’ default for DB_NAME and DB_USER, whereas the server with the problems is using non-default values for these.
My suspicion, based on maryr’s implication that the problem cropped up with 2.5.1, and my suspicion that this also happened with my problematic server, is that 2.5.1 has a bug in updating existing databases.
I normally just have MySQL backups, so didn’t see a clean way to recover. I fetched the table definitions from a backup of the good server, ran CREATEs on the problematic server, and am not able to manually re-enter categories and assign posts to categories. Not fun, but not terrible.