We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

benpjohnson on 08/13/07


Tagged

mysql tables repair


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

mabridge
jamesming


Fix MySQL Table problems


Published in: Bash 


Useful when your server runs out of disk space

  1. myisamchk -s $(find /var/lib/mysql/ -name *.MYI)
  2.  
  3. /etc/rc.d/init.d/mysqld stop
  4.  
  5. And this to fix the tables that need repairing:
  6.  
  7. myisamchk -r -q <PATH>/table_name.MYI

Report this snippet 

You need to login to post a comment.