mysql-log-rotate.sh
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. # This logname is set in mysql.server.sh that ends up in /etc/rc.d/init.d/mysql
  2. #
  3. # If the root user has a password you have to create a
  4. # /root/.my.cnf configuration file with the following
  5. # content:
  6. #
  7. # [mysqladmin]
  8. # password = <secret> 
  9. # user= root
  10. #
  11. # where "<secret>" is the password. 
  12. #
  13. # ATTENTION: This /root/.my.cnf should be readable ONLY
  14. # for root !
  15. @localstatedir@/mysqld.log {
  16.         # create 600 mysql mysql
  17.         notifempty
  18. daily
  19.         rotate 3
  20.         missingok
  21.         compress
  22.     postrotate
  23. # just if mysqld is really running
  24. if test -n "`ps acx|grep mysqld`"; then
  25.         @bindir@/mysqladmin flush-logs
  26. fi
  27.     endscript
  28. }