So I’ve noticed that if the server ends in a non-graceful fashion, i.e., crashes randomly, it creates a new error log file with the date appended.
In our environment, errors log to /var/log/mysql/mysqld.log and we have a logrotate config set to rotate weekly and then gzip. However, if the server crashes, everything before that crash is automatically moved to mysqld.log-YYYYMMDD. Not only does this break the logrotate config, but sometimes the server continues to log to the mysqld.log-YYYYMMDD file.
Is this the intended behavior on crashes? It would be nice to have everything continue to log to the main file, as that’s how flush logs has behaved for awhile now.