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,
I forgot to mention env details
WinXP, Py2.6, Python2.6 MySQL-Python-1.2.3b1
MySQL 5.1.42
thanks
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.
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,
I forgot to mention env details
WinXP, Py2.6, Python2.6 MySQL-Python-1.2.3b1
MySQL 5.1.42
thanks
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.