Flush logs, binary log index file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jean Hagen

    Flush logs, binary log index file

    I'm trying to write a script to weekly remove MySQL logs, the general,
    error and binary log files.

    Following the MySQL documentation, I've written a script that moves all
    current log files, then executes mysqladmin flush-logs.

    My question is this on the binary logs (bin.001, bin.002, etc.): once these
    are removed and flush logs is executed, the binary log files start over
    with bin.001.

    HOWEVER, the binary index file does not appear affected by the flush-logs
    command; ie, if I'm up to bin.003 in the binary.index file, remove the
    files and execute the flush logs command, I'm back to a file names bin.001,
    although the binary.index file still has entries for bin.001, bin.002,
    bin.003, etc. How does the binary index file stay current when you remove
    the logs??


    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=m...ie.nctu.edu.tw

Working...