Fix MySQL Table problems


/ Published in: Bash
Save to your folder(s)

Useful when your server runs out of disk space


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.