Quick proof of concept logrotate that hasn't really been changed in a while. The aim is to get this closer to a state for distro maintainers to use directly. By using a dedicated SQL user this shouldn't conflict with an existing user root user (which users always use despite the ability create other users with SUPER privs). As users will occasional change the password on the root without taking into account that logrotate typically uses the same user. Relying on users to update /root/.my.cnf is unreliable. Giving selinux permissions to allow logrotate read files under /root is also a little excessive. Using a dedicated mysqladmin.logrotate this won't conflict with existing mysqladmin group. Adds slow query log and general log to the logrotate script. Binary logs are deliberately omitted (MDEV-11610). https://mariadb.com/kb/en/mariadb/sql_error_log-plugin/ seems to have its own rotation) Proposed changes: https://github.com/MariaDB/server/compare/10.2...grooverdan:10.2-logrotate?e... mysqladmin --local uses SET SESSION SQL_LOG_BIN=0 so I'll change its implementation to use FLUSH LOCAL ... which would preserve the need to use RELOAD only privs for logrotate. Thoughts? Difficulties? Suggestions? ref: https://jira.mariadb.org/browse/MDEV-11610 https://jira.mariadb.org/browse/MDEV-5662