Here’s how to check, repair and optimize all your mysql tables in all databases on a server…
mysqlcheck -u root -p – -auto-repair –check –optimize –all-databases
Note: you do not have to have root to do this, simply replace -u root with -u yourusername
That’s it..
(Remember if you are using a tool like phpmyadmin (http://www.phpmyadmin.com) you can always log in, browse to the table, select operations and choose “repair”, “check”, “analyse” or “optimize table”)
Tweet
Erik
Tuesday, March 22, 2011
linux administration - tips, notes and projects
1 Comment