maintenance --> optimize Database as sh script or cron

Post Reply
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

maintenance --> optimize Database as sh script or cron

Post by Fett » Tue Nov 07, 2017 11:39 am

How can I achieve the same thing:

maintenance --> optimize database

running as a .sh script via cron job?

I am dealing with corrupted databases time after time because I have MYISAM tables (my mysql version does not support innodb)

So can I please run repair service function somehow by cron?

admin
Site Admin
Posts: 25489
Joined: Wed Sep 10, 2008 11:43 am

Re: maintenance --> optimize Database as sh script or cron

Post by admin » Tue Nov 07, 2017 11:42 am

Basically "optimize Database " = sql query "REPAIR TABLE table_name"
so you can run this query using mysql command line BUT rather then doing this I think there's much better idea - update mysql
Have you done script update ?

Post Reply