How to optimize or repair MySQL?
Here is a few articles that will assist you with MySQL optimization and repair:
MySQL Server Variables - SQL layer or Storage Engine specific
Optimizing the mysqld variables by Ian Gilfillan
Repairing Database Corruption in MySQL by Ian Gilfillan
Optimizing MySQL: Queries and Indexes by Ian Gilfillan