Skip to content
Go back

Repair & Optimize all Mysql Databases one liner

By SumGuy 2 min read
Repair & Optimize all Mysql Databases one liner

Mysql tuner telling you to optimize your tables? or you just happen to be bored? Mysql optimize Reorganizes the physical storage of table data and associated index data, to reduce storage space and improve I/O efficiency when accessing the table. The exact changes made to each table depend on the storage engine used by that table. This statement does not work with views.  You should use OPTIMIZE TABLE in these cases, depending on the type of table:

This statement requires SELECT and INSERT privileges for the table.

well use this one liner to repair/optimize all your DBs in one go.

mysqlcheck --auto-repair --optimize --all-databases

voila!


Share this post on:

Send a Webmention

Written about this post on your own site? Send a webmention and it'll show up above once verified.


Previous Post
linux shell argument list too long rsync or cp
Next Post
Remove spaces or Edit chracters in filenames

Discussion

Powered by Garrul . Sign in with GitHub or Google, or post anonymously.

Related Posts