Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0Digg thisPin on Pinterest0Email this to someone

How to setup a mysqlcheck cronjob in Virtualmin to run automatically every midnight and make it check, optimize and repair all of your databases and tables.

Setup mysqlcheck cronjob in Virtualmin

 – Login to Virtualmin

– browse to Webmin >> System >> Scheduled Cron Jobs

– Click on >>  Create a new scheduled cron job.

– set “Execute as” to =   root

– set “Command” to =  mysqlcheck -orA -pPassword > /dev/null

(Where “password” is your root password.)

  • -o = Optimize the tables 
  • -r = Perform a repair that can fix almost anything except unique keys that are not unique.
  • -A = Check all tables in all databases.
  • -p = use password 

– Set “Simple schedule ..” to = Daily at midnight

– Click Save

 mysqlcheck will now run automatically, check optimize, repair all of your databases and tables every night at midnight. 

 

If you enjoyed this post, why not leave a comment or consider a Donation as a token of your appreciation. If you need help implementing something you saw on this site or any other project why not Hire Me?
How to: CentOS Virtualmin MySQL mysqlcheck Cronjob
Tagged on:                                                         

Leave a Reply

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

Loading Facebook Comments ...