MySQL, Wordpress, and crashed tables…
Folks,
Just a note that the (Xen) guest kernelpodcast.org is running on occasionally OOMs, and that this is being fixed with a virtual RAM upgrade. Meanwhile, on the few occasions this has happened, it has taken down MySQL, leading to crashed database tables. Wordpress then assumes it has just been newly installed…and one ends up with a database filled with a new “test page”, “test post”, “test comment”, etc. for each time someone tries to open the site. Not a particularly helpful situation.
If anyone knows how to tell wordpress, in case this ever happens again, “I am really installed but MySQL might have crashed uncleanly and need a manual myisam check, and under no circumstances should you flood the database with crap”, I would love to hear from you
Jon.











I think latest version of Wordpress will be able to do that :
http://www.wpbeginner.com/news/most-notable-features-in-wordpress-2-9/
Optimize/Repair Database Functionality
WordPress has added a new feature to the core which allows you to repair and optimize your database. In order to activate this function, you will need to add this line in your wp-config.php
define(’WP_ALLOW_REPAIR’, true);
Once you have added it, you will now be able to run the script which is located at this URL:
http://www.yoursite.com/wp-admin/maint/repair.php
When you arrive to that page, you will see a screen like this:
If you use innodb instead of myisam then you won’t have to bother with the check because the tables won’t be crashed.
Seconding the recommendation for InnoDB tables. InnoDB represents the table format for “go slightly slower but actually have semantics resembling a real database”.
But apart from that, I’d also recommend switching to something other than wordpress, perhaps something that doesn’t represent a huge server load. Might I suggest ikiwiki? It does everything you need, and generates static pages which you can serve up without even using a CGI, let alone a database. (You only need the CGI for editing, and you can also edit by committing and pushing your VCS repository.)