views:

45

answers:

0

I am using PHP and mysql. I am logging mysql query with data in a separate file which extension is sql. (filename.sql). Purpose is I can use this sql log file as backup file. Logging varchar,int values with query is working fine. SQL log file looks as sql backup file which is created by mysqldump hence I can use sql log file as SQL script. But when I am logging Blob data into sql file, which does not look like SQL script and gives error when I use as SQL script.

I am aware about mysqldump command, even I have seen the mysqlbackup file.

How mysqldump utility writes binary data in the file? It has escape chars before on non printable integer values.

In my case, I do not want to use mysqldump utility since my requirement is small hence I decides logging query with data while the query is running.