Repair and optimize all database at once
Today somehow our mysql service crashed tables being broken. It is really painful to repair them 1 by 1 through phpmyadmin. So if you have access through SSH then you can run just a single command from console.
All posts around internet gives you
mysqlcheck -Aor
but this won't work unless you dont have pass for root. All you have to do is add -p on it like this
mysqlcheck -Aorp
All posts around internet gives you
mysqlcheck -Aor
but this won't work unless you dont have pass for root. All you have to do is add -p on it like this
mysqlcheck -Aorp
this will ask your root password.
Explanation
-A -> All Databases
-o -> optimize
-r -> repair
-p -> Password
If just wanna repair exclude -o, and just wanna optimize exclude -r. Thats all
Comments
Post a Comment