I'm seeing conflicting (or complementary) answers on how to rotate mySQL logs and want to know if each method is sufficient in itself, or if I need to use a combination of both.
One method, suggested here, prescribes these steps:
SET
loggingOFF
RENAME
log fileSET
loggingON
Another method, from here, gives these steps:
RENAME
the log fileFLUSH LOGS
mySQL documentation mentions all these steps but doesn't make clear whether they're different methods of doing the same thing or all necessary steps of the process. Do I need to FLUSH LOGS
and SET
logging on/off, or just do one of the two?