Is there a script doing mysql maintenance ?
or
how can i make it manually, using cron tab ?
and
what steps should a good mysql maintenance run ?
(MyISAM)
Is there a script doing mysql maintenance ?
or
how can i make it manually, using cron tab ?
and
what steps should a good mysql maintenance run ?
(MyISAM)
By far the best opensource and used code is this for simple backups automysqlbackup
It can make simple full backups and have them rotated automatically for you..
You could also instead consider using LVM on your mysql directory and making backups on the fly without needing to locktables..
MyISAM tables are table locking, not row locking, so during a mysql backup some tables are not writable..
Unless you are having extremely high throughput, just go with the link i gave you :D
mysqlcheck
in crontab works well. Periodically review the logs.There's an important caveat in the documentation:
Here's how I've used it:
Unless you're using FULLTEXT indexes, you should really convert to InnoDB. MyISAM is old and will corrupt your data given the slightest excuse, not to mention the fact that it's slow. Conversion is as simple as:
ALTER TABLE (tablename) ENGINE=InnoDB
for each table.If you insist on using MyISAM, a simple "mysqlcheck -A --optimize" or similar should do what you seem to want.