Be carefull, the comment form remove all double – before …

Thursday, 28th March 2024

Comment on Optimize, check and repair tables in MySQL, howto improve work with tables in MySQL by HgAlexx.

Be carefull, the comment form remove all double – before all arg.
Check mysqlcheck manpage for more info.

HgAlexx Also Commented

Optimize, check and repair tables in MySQL, howto improve work with tables in MySQL
Hi,

I am using a simple .sh in a daily cron:

mysqlcheck –defaults-extra-file=/etc/mysql/debian.cnf –check –analyze –auto-repair –optimize –all-databases –silent >> /var/log/mysql/cronwork.log

Where /etc/mysql/debian.cnf contains login info of the special system account debian use to perform any task on mysql

This will do everything on all tables of all databases, if required.
–silent will only output error in /var/log/mysql/cronwork.log

Bye.


Share this on:

Comments are closed.