Welcome to the blog of mechanised.com

This blog is mainly a technical repository of information on Virtualisation tools and management for our hosting service.

Also for HP's Bladesystem that we use at both our datacentres.

Other articles are also included on .Net development and MS SQL Server as well as other interesting things we come across.

Monday, 19 July 2010

Quick fix for tables marked as crashed in MySQL

First off stop the MySQL database server:
/etc/init.d/mysql stop or service mysql stop
Go into the directory where the tables are stored:
cd /var/lib/mysql
Check each database for errors:
myisamchk -cs a*/*.MYI
If errors found then run the fix:
myisamchk -r a*/*.MYI
Once all checked and repaired, restart the service:
/etc/init.d/mysql start or service mysql start

No comments: