Optimize and repair all mysql databases at once

There is a really handy MySql utility calledĀ mysqlcheck that allows you to do a number of actions to all databases on your mysql server at once. I am writing this specifically for Linux, but I'm sure windows and Unix versions are very similar if not exactly the same. Run this command as root (super user)

Repair & Optimize

mysqlcheck -Aor

Repair Only

mysqlcheck -Ar

Optimize Only

mysqlcheck -Ao

Argument Definitions

-A - Check all Mysql databases
-r - Repair all Mysql databases
-o - Optimize all Mysql databases

To see all of the available options, runĀ mysqlcheck --help

  • 1 Users Found This Useful
Was this answer helpful?

Also Read

How to Create Full backup for an account visa SSH

CPanel: Backup and Restore a Domain Account via SSHPlease Rate us Sometimes there is a need...

How create a backup of a MySQL database using SSH

Please Rate us  Log into your account on our server and issue the following command:...

mysql user with the name already exists. how to delete

Please Rate us Solving an issue of Extracting tarball................... DoneExtracting...

How to disable SSH login for the root user?

Please Rate us  To disable root login, open the main ssh configuration file...

How to install OpenVPN on Linux?

apt-get install openvpn openssl udev ...