Optimize all MySQL Tables

This post was published 1 year, 7 months ago. Due to the rapidly evolving world of technology, some concepts may no longer be applicable.

A one-liner to optimize all MySQL tables, in all databases. Be advised that running optimize on InnoDB does a ‘recreate and analyze’. Run as root in the example below.

mysqlcheck -o -u root -p --all-databases

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>