Mass repair and optimize all MySQL databases on my CPanel server

Q) How can I mass optimize repair & optimize on my CPanel servers MySQL ?

A) open SSH and connect to your server.
Run the following command:

mysqlcheck -u root -p –auto-repair –optimize –all-databases

it will ask you for your MySQL root password, if you do not know this then Login to WHM as root user, on the left type MySQL and click MySQL Root password.  Enter a new password and save.
Don’t worry this won’t break anything!

then go back to SSH and try again.

Originally posted on March 15, 2017 @ 10:46 pm

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.