Re: Logging SQL queries

2009-06-03 Thread Tompkins Neil
Hi

Thanks for the response.  In fact my main requirement is to track the
queries executed in the event we have some data which has been contaminated
in some way - which will help us with our investigations.  Basically I've
designed a brand new back end office - and feel I need to record the queries
which are executed by the users.

What do you think ? or do you think this would not be necessary.

Cheers
Neil

On Thu, May 28, 2009 at 7:14 PM, Baron Schwartz ba...@xaprb.com wrote:

 For this purpose, I'd suggest using the slow query log (and a log
 analysis tool such as mk-query-digest), which has performance data the
 general log doesn't have.  In MySQL 5.1, you can get all queries
 written to the log by setting the long_query_time to 0.  In MySQL 5.0
 you can't really get that, unless you use a Percona or OurDelta build
 of the server.  You can also use MySQL Enterprise's query analyzer,
 which has a really nice interface.  I'm not sure if it would suit your
 auditing requirements, though.

 On Thu, May 28, 2009 at 6:18 AM, Tompkins Neil
 neil.tompk...@googlemail.com wrote:
  Hi
 
  The purpose is really for auditing and constant performance analysis ?  I
  could save each query in my own user generated table.  But thought maybe
  best to use mysql's built in feature.
 
  Neil
 
  On Wed, May 27, 2009 at 5:22 PM, Baron Schwartz ba...@xaprb.com wrote:
 
  Neil,
 
  What is the purpose?  Is it for auditing, performance analysis, ...?
 
  Regards
  Baron
 
  On Wed, May 27, 2009 at 10:12 AM, Tompkins Neil
  neil.tompk...@googlemail.com wrote:
   Hi,
  
   We've developed a new extranet system and feel that we need to record
   all
   queries performed.  What is the best / recommended way to achieve
 this.
  
   Thanks
   Neil
  
 
 
 
  --
  Baron Schwartz, Director of Consulting, Percona Inc.
  Our Blog: http://www.mysqlperformanceblog.com/
  Our Services: http://www.percona.com/services.html
 
 



 --
  Baron Schwartz, Director of Consulting, Percona Inc.
 Our Blog: http://www.mysqlperformanceblog.com/
 Our Services: http://www.percona.com/services.html



Re: Logging SQL queries

2009-05-28 Thread Tompkins Neil
Hi

The purpose is really for auditing and constant performance analysis ?  I
could save each query in my own user generated table.  But thought maybe
best to use mysql's built in feature.

Neil

On Wed, May 27, 2009 at 5:22 PM, Baron Schwartz ba...@xaprb.com wrote:

 Neil,

 What is the purpose?  Is it for auditing, performance analysis, ...?

 Regards
 Baron

 On Wed, May 27, 2009 at 10:12 AM, Tompkins Neil
 neil.tompk...@googlemail.com wrote:
  Hi,
 
  We've developed a new extranet system and feel that we need to record all
  queries performed.  What is the best / recommended way to achieve this.
 
  Thanks
  Neil
 



 --
 Baron Schwartz, Director of Consulting, Percona Inc.
 Our Blog: http://www.mysqlperformanceblog.com/
 Our Services: http://www.percona.com/services.html



RE: Logging SQL queries

2009-05-27 Thread Nathan Sullivan
Neil,

You can turn on the general query log by adding a line like this to your 
configuration file:

log=/var/log/mysql_queries.log


Regards,
Nathan
-Original Message-
From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] 
Sent: Wednesday, May 27, 2009 9:13 AM
To: [MySQL]
Subject: Logging SQL queries

Hi,

We've developed a new extranet system and feel that we need to record all
queries performed.  What is the best / recommended way to achieve this.

Thanks
Neil

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Logging SQL queries

2009-05-27 Thread Mauricio Tellez
Hi, you can start mysql server with --log=/someplace/my_queries.txt   and
every query the server runs is logged in that file. Keep in mind that if the
server runs another systems all queries are logged so you need to identify
the ones belong to your system. Also, if you system has a lot of query call,
this file can grow very fast so watch this. One disadvantage is with stored
procedure: only the call to the stored procedure is logged, but any of the
queries inside them. Hope this help!

2009/5/27 Tompkins Neil neil.tompk...@googlemail.com

 Hi,

 We've developed a new extranet system and feel that we need to record all
 queries performed.  What is the best / recommended way to achieve this.

 Thanks
 Neil




-- 
Mauricio Tellez


Re: Logging SQL queries

2009-05-27 Thread Claudio Nanni
Enable mysql SQL logging in the configuration file.

[mysqld]
log

Cheers

Claudio



2009/5/27 Tompkins Neil neil.tompk...@googlemail.com

 Hi,

 We've developed a new extranet system and feel that we need to record all
 queries performed.  What is the best / recommended way to achieve this.

 Thanks
 Neil



Re: Logging SQL queries

2009-05-27 Thread Baron Schwartz
Neil,

What is the purpose?  Is it for auditing, performance analysis, ...?

Regards
Baron

On Wed, May 27, 2009 at 10:12 AM, Tompkins Neil
neil.tompk...@googlemail.com wrote:
 Hi,

 We've developed a new extranet system and feel that we need to record all
 queries performed.  What is the best / recommended way to achieve this.

 Thanks
 Neil




-- 
Baron Schwartz, Director of Consulting, Percona Inc.
Our Blog: http://www.mysqlperformanceblog.com/
Our Services: http://www.percona.com/services.html

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org