Optimize MySQL Databases on Cpanel/WHM server
1. Open an SSH connection to the server and log in as the root user.
To repair and optimize a single database, run the following commands:
mysqlcheck -u DATABASEUSER -p --auto-repair --check --optimize --all-databases
It will ask for the DATABASE user password :
To repair and optimize a all databases, run the following commands:
mysqlcheck --auto-repair --check --optimize --all-databases
It will repair and optimize your Mysql databases, Restart MySQL after you've done the above:
/etc/init.d/mysql restart
Done...
![]()


Reply With Quote
