Logging SQL queries
am 27.05.2009 16:12:34 von Tompkins Neil
--00504502d7e858a598046ae56f70
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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
--00504502d7e858a598046ae56f70--
Re: Logging SQL queries
am 27.05.2009 16:19:03 von Claudio Nanni - TomTom
--000e0cd28bfc7b5301046ae58695
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Enable mysql SQL logging in the configuration file.
[mysqld]
log
Cheers
Claudio
2009/5/27 Tompkins Neil
> 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
>
--000e0cd28bfc7b5301046ae58695--
RE: Logging SQL queries
am 27.05.2009 16:21:29 von Nathan Sullivan
Neil,
You can turn on the general query log by adding a line like this to your co=
nfiguration file:
log=3D/var/log/mysql_queries.log
Regards,
Nathan
-----Original Message-----
From: Tompkins Neil [mailto:neil.tompkins@googlemail.com]=20
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=3Dgcdmg-mysql-2@m.gmane.o rg
Re: Logging SQL queries
am 27.05.2009 16:24:50 von Mauricio Tellez
--001636c5b80728ef31046ae59bad
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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
> 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
--001636c5b80728ef31046ae59bad--
Re: Logging SQL queries
am 27.05.2009 18:22:10 von 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
wrote:
> Hi,
>
> We've developed a new extranet system and feel that we need to record all
> queries performed. =A0What is the best / recommended way to achieve this.
>
> Thanks
> Neil
>
--=20
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=3Dgcdmg-mysql-2@m.gmane.o rg
Re: Logging SQL queries
am 28.05.2009 12:18:28 von Tompkins Neil
--001636c5a87ef5893b046af647df
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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 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
> 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
>
--001636c5a87ef5893b046af647df--
Re: Logging SQL queries
am 03.06.2009 18:04:36 von Tompkins Neil
--001636c5b496e2aaaf046b73d084
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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 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
> 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 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
> >> 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
>
--001636c5b496e2aaaf046b73d084--