Script to check, repair and optimize all databases

Posted: 18/12/2012 in Shell tips

An easy and very useful command to automatically check, repair and optimize all tables in all mysql databases

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases
Advertisements
Comments
  1. upcode says:

    My MySQL 5.5.31 said: Error: mysqlcheck doesn’t support multiple contradicting commands.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s