tags:

views:

10

answers:

1

I want insert query statement in DB for LOG. Is there a way that i can read from mysql binarylog file with php code and insert query statement in DB?

+2  A: 

Probably you can (it's a file, it's content, you can alter it), but you shouldn't do it. You have no guarantee a format doesn't change, what else is reading it, etc. If you need to enter a query in a binlog something has can horribly wrong, and you should do it very carefully by hand. If you think about doing it on a regular basis with a script I'm about 99.99999% sure you're solving a problem the wrong way.

Wrikken
thank you very much.
mohammad mirzadeh