Menu

MySQL Flush Logs

Help
Anonymous
2010-03-08
2012-09-19
  • Anonymous

    Anonymous - 2010-03-08

    Hi, I am trying to write a small Python script to automate mysql incremental
    backup using bin-log in Windows. and I am following this site as reference:
    http://dev.mysql.com/doc/refman/5.1/en/backup-
    methods.html

    For this, how do I capture the output of query 'FLUSH LOGS' in python?

    I hope to get the bin log filename and position and backup all older bin log
    files.

    any pointers?

    thanks,

     
  • Anonymous

    Anonymous - 2010-03-08

    I forgot to mention env details

    WinXP, Py2.6, Python2.6 MySQL-Python-1.2.3b1

    MySQL 5.1.42

    thanks

     
  • Andy Dustman

    Andy Dustman - 2010-03-09

    FLUSH LOGS is like any other query: It might return a result set with rows.
    Just fetch them normally.

    You might also want to SHOW BINARY LOGS, as it's not clear that FLUSH LOGS
    actually generates a result.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.