MySQL Forums
Forum List  »  Security

Re: How can I log query?
Posted by: John H. Embretsen
Date: January 17, 2011 02:29AM

Enabling the general log on the server may help you in the right direction. Documentation for that in the 5.5 release is here:

http://dev.mysql.com/doc/refman/5.5/en/query-log.html

In short, add --general-log=1 and --log-output=FILE to your server options and you will be able to read queries from a log file.

You can also use --log-output=TABLE to log queries to the database and query it whenever you like using SQL, or export the log to other applications via CSV files.

http://dev.mysql.com/doc/refman/5.5/en/log-destinations.html

--
John

Options: ReplyQuote


Subject
Views
Written By
Posted
3388
January 12, 2011 06:10PM
Re: How can I log query?
1607
January 17, 2011 02:29AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.