Skip to content

Instantly share code, notes, and snippets.

@Linuxpizi
Created May 26, 2020 10:05
Show Gist options
  • Select an option

  • Save Linuxpizi/ca045dbd18f89c2da0d0aa316ed096c5 to your computer and use it in GitHub Desktop.

Select an option

Save Linuxpizi/ca045dbd18f89c2da0d0aa316ed096c5 to your computer and use it in GitHub Desktop.
MySQL logrotate日志切割
#/var/log/mysqld.log {
#        create 640 mysql mysql
#        notifempty
#        daily
#        rotate 5
#        missingok
#        compress
#    postrotate
#       # just if mysqld is really running
#       if test -x /usr/bin/mysqladmin && \
#          /usr/bin/mysqladmin ping &>/dev/null
#       then
#          /usr/bin/mysqladmin flush-logs
#       fi
#    endscript
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment