I am not a mysql or sql expert by any means, and not too savy on FreeBSD, either. We have a server that regularly needs one table to have data deleted < a time frame that leaves only 1 month of data behind. Typical issue that the table becomes too big and then it can't write.
There are only two commands when I remote in:
mysql -h A.B.C.D -u USER -p radius
mysql> DELETE FROM calls WHERE event_date_time < '2014-01-01 00:00:00';
mysql> optimize table calls;
I have to do this all from a jumpbox--I don't have access to the underlying os of this server. How would I set up a cronjob to do this every two months, for example?
Thanks