I want to daily rotate MySQL log files on Windows. I want to keep the files, I don't want to use tables instead.
There are 3 log files: general.log slow-queries.log and error.log
I can do it easily with a scheduled task. I saw that it recommended stopping the logs before I copy them to the backup directory.
- One problem is that 'error.log' cannot be stopped.
- Another problem is that stopping the logs may cause some loss of events, and I want to avoid it.
Is there a safer way (or built-in way) for logs rotation? (on a daily base or according to the file size)?