home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / MySql / support-files / mysql-log-rotate.sh < prev    next >
Encoding:
Text File  |  2001-01-01  |  658 b   |  30 lines

  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.  
  16. @localstatedir@/mysqld.log {
  17.         # create 600 mysql mysql
  18.         notifempty
  19.     daily
  20.         rotate 3
  21.         missingok
  22.         compress
  23.     postrotate
  24.     # just if mysqld is really running
  25.     if test -n "`ps acx|grep mysqld`"; then
  26.             @bindir@/mysqladmin flush-logs
  27.     fi
  28.     endscript
  29. }
  30.