How to repair corrupted mysql table?

P

postcd

Guest
Hello,

im having command to check and repair (at least i believe) all mysql tables in all databases:

mysqlcheck -u root -p*** --all-databases --check --auto-repair -F -C

but on my website i got error message an table is crashed, so i run above command but it just returned like:

myusername_mydbname.prefix_tablename
warning : Table is marked as crashed
error : Found 10150 keys of 10151
error : Corrupt

So i want to ask how i can repair that table using mysqlcheck or any other linux command?

Its possible to do via phpmyadmin but i need linux command.

Thx
 


as You can see, im using "--auto-repair " operator to the "mysqlcheck" command.
How can i add yours mentioned repair command into my command so its repaired automatically when table is corupt?
 
if MyISAM:
stop mysql and launch :
myisamchk -r -v -f --sort_buffer_size=128M --key_buffer_size=128M /path/to/your/base/table.MYI
 

Members online


Latest posts

Top