Forum Moderators: open

Message Too Old, No Replies

howto Save all queries in mysql to a file

         

AffiliateDreamer

1:07 pm on Jan 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

Is it possible to save all queries that my web applications send to my mysql database to a file?

I want to trace things in an application, so after I view a few pages I would like to open up a file that has all the queries that mysql handled during that time.

phranque

1:55 pm on Jan 13, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you probably want to turn on the general query log [dev.mysql.com].

AffiliateDreamer

2:39 pm on Jan 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



generally, will I be able to do this in a shared hosting environment?

phranque

1:39 am on Jan 14, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



you will have to restart the mysql server as described in the linked reference.
if this isn't an option you could implement query logging in your db abstraction layer...