Disabling logging for connection

Disabling logging for connection

am 25.02.2004 00:40:02 von Mike Mimic

Hi!

I have a problem with logging. I am logging all
queries to MySQL server. And I have a program which
inserts large chunks of data. The problem is that I
would like to log all queries except for those insert
queries as those flood my logs (they get really very
big). The program is written in Perl. So is there a
way to say from Perl (with DBI) that you do not want
this connection (I would set this in that program with
inserts queries) to be logged? Is there some other
solution?

Best regards and please help


Mike

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Disabling logging for connection

am 25.02.2004 01:05:40 von Rudy Lippan

On Tue, 24 Feb 2004, Mike Mimic wrote:

> I have a problem with logging. I am logging all
> queries to MySQL server. And I have a program which
> inserts large chunks of data. The problem is that I
> would like to log all queries except for those insert
> queries as those flood my logs (they get really very
> big). The program is written in Perl. So is there a
> way to say from Perl (with DBI) that you do not want
> this connection (I would set this in that program with
> inserts queries) to be logged? Is there some other
> solution?

I don't see any way of doing this though the mysql API, but you might want
to try asking on one of the more general mysql lists. And if there is an
API call that would let you do this/ connection option -- let me know and
I will add it to DBD::mysql.

Rudy


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Disabling logging for connection

am 25.02.2004 01:05:40 von Rudy Lippan

On Tue, 24 Feb 2004, Mike Mimic wrote:

> I have a problem with logging. I am logging all
> queries to MySQL server. And I have a program which
> inserts large chunks of data. The problem is that I
> would like to log all queries except for those insert
> queries as those flood my logs (they get really very
> big). The program is written in Perl. So is there a
> way to say from Perl (with DBI) that you do not want
> this connection (I would set this in that program with
> inserts queries) to be logged? Is there some other
> solution?

I don't see any way of doing this though the mysql API, but you might want
to try asking on one of the more general mysql lists. And if there is an
API call that would let you do this/ connection option -- let me know and
I will add it to DBD::mysql.

Rudy


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Disabling logging for connection

am 25.02.2004 10:04:42 von Tim Cutts

On 25 Feb 2004, at 00:05, Rudy Lippan wrote:

> On Tue, 24 Feb 2004, Mike Mimic wrote:
>
>> I have a problem with logging. I am logging all
>> queries to MySQL server. And I have a program which
>> inserts large chunks of data. The problem is that I
>> would like to log all queries except for those insert
>> queries as those flood my logs (they get really very
>> big). The program is written in Perl. So is there a
>> way to say from Perl (with DBI) that you do not want
>> this connection (I would set this in that program with
>> inserts queries) to be logged? Is there some other
>> solution?
>
> I don't see any way of doing this though the mysql API, but you might
> want
> to try asking on one of the more general mysql lists. And if there is
> an
> API call that would let you do this/ connection option -- let me know
> and
> I will add it to DBD::mysql.

As far as I know there is no way of switching general logging on and
off without reconfiguring and restarting the server. Personally, I
think this is a major failing in MySQL. Most of the time, you don't
want logging enabled, for precisely the reason the OP states - on a
moderately busy server these logs get large fast. But it would be
useful to switch it on and off selectively for analysing performance
issues and so on.

Tim

--
Dr Tim Cutts
Informatics Systems Group
Wellcome Trust Sanger Institute
Hinxton, Cambridge, CB10 1SA, UK


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Disabling logging for connection

am 25.02.2004 10:04:42 von Tim Cutts

On 25 Feb 2004, at 00:05, Rudy Lippan wrote:

> On Tue, 24 Feb 2004, Mike Mimic wrote:
>
>> I have a problem with logging. I am logging all
>> queries to MySQL server. And I have a program which
>> inserts large chunks of data. The problem is that I
>> would like to log all queries except for those insert
>> queries as those flood my logs (they get really very
>> big). The program is written in Perl. So is there a
>> way to say from Perl (with DBI) that you do not want
>> this connection (I would set this in that program with
>> inserts queries) to be logged? Is there some other
>> solution?
>
> I don't see any way of doing this though the mysql API, but you might
> want
> to try asking on one of the more general mysql lists. And if there is
> an
> API call that would let you do this/ connection option -- let me know
> and
> I will add it to DBD::mysql.

As far as I know there is no way of switching general logging on and
off without reconfiguring and restarting the server. Personally, I
think this is a major failing in MySQL. Most of the time, you don't
want logging enabled, for precisely the reason the OP states - on a
moderately busy server these logs get large fast. But it would be
useful to switch it on and off selectively for analysing performance
issues and so on.

Tim

--
Dr Tim Cutts
Informatics Systems Group
Wellcome Trust Sanger Institute
Hinxton, Cambridge, CB10 1SA, UK


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Java interfaces

am 25.02.2004 14:16:31 von lshen

Dose anyone know how to connect mysql with Java?

Brian
----- Original Message -----
From: "Mike Mimic"
To:
Sent: Tuesday, February 24, 2004 06:40 PM
Subject: Disabling logging for connection


> Hi!
>
> I have a problem with logging. I am logging all
> queries to MySQL server. And I have a program which
> inserts large chunks of data. The problem is that I
> would like to log all queries except for those insert
> queries as those flood my logs (they get really very
> big). The program is written in Perl. So is there a
> way to say from Perl (with DBI) that you do not want
> this connection (I would set this in that program with
> inserts queries) to be logged? Is there some other
> solution?
>
> Best regards and please help
>
>
> Mike
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.
> http://antispam.yahoo.com/tools
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe:
http://lists.mysql.com/perl?unsub=lshen@pop900.gsfc.nasa.gov
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Java interfaces

am 25.02.2004 14:16:31 von lshen

Dose anyone know how to connect mysql with Java?

Brian
----- Original Message -----
From: "Mike Mimic"
To:
Sent: Tuesday, February 24, 2004 06:40 PM
Subject: Disabling logging for connection


> Hi!
>
> I have a problem with logging. I am logging all
> queries to MySQL server. And I have a program which
> inserts large chunks of data. The problem is that I
> would like to log all queries except for those insert
> queries as those flood my logs (they get really very
> big). The program is written in Perl. So is there a
> way to say from Perl (with DBI) that you do not want
> this connection (I would set this in that program with
> inserts queries) to be logged? Is there some other
> solution?
>
> Best regards and please help
>
>
> Mike
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.
> http://antispam.yahoo.com/tools
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe:
http://lists.mysql.com/perl?unsub=lshen@pop900.gsfc.nasa.gov
>
>


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Java interfaces

am 25.02.2004 14:25:21 von Jochen Wiedmann

Brian Shen wrote:

> Dose anyone know how to connect mysql with Java?

By using the Java driver for MySQL, as downloadable on www.mysql.com?


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Java interfaces

am 25.02.2004 14:25:21 von Jochen Wiedmann

Brian Shen wrote:

> Dose anyone know how to connect mysql with Java?

By using the Java driver for MySQL, as downloadable on www.mysql.com?


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Disabling logging for connection

am 25.02.2004 18:56:56 von Mike Mimic

Hi!

--- Tim Cutts wrote:
> As far as I know there is no way of switching
> general logging on and off without reconfiguring and
> restarting the server.
> Personally, I think this is a major failing in
MySQL.
> Most of the time, you don't want logging enabled,
for
> precisely the reason the OP states - on a
> moderately busy server these logs get large fast.
> But it would be useful to switch it on and off
> selectively for analysing performance
> issues and so on.

I asked on another list and I got the answer. It is
possible. This does the trick:

SET SQL_LOG_OFF=1

More info:
http://www.mysql.com/doc/en/SET_OPTION.html

Thanks to both of you.


Mike



__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Disabling logging for connection

am 25.02.2004 18:56:56 von Mike Mimic

Hi!

--- Tim Cutts wrote:
> As far as I know there is no way of switching
> general logging on and off without reconfiguring and
> restarting the server.
> Personally, I think this is a major failing in
MySQL.
> Most of the time, you don't want logging enabled,
for
> precisely the reason the OP states - on a
> moderately busy server these logs get large fast.
> But it would be useful to switch it on and off
> selectively for analysing performance
> issues and so on.

I asked on another list and I got the answer. It is
possible. This does the trick:

SET SQL_LOG_OFF=1

More info:
http://www.mysql.com/doc/en/SET_OPTION.html

Thanks to both of you.


Mike



__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Disabling logging for connection

am 25.02.2004 19:59:57 von Tim Cutts

On 25 Feb 2004, at 17:56, Mike Mimic wrote:
> I asked on another list and I got the answer. It is
> possible. This does the trick:
>
> SET SQL_LOG_OFF=1
>
> More info:
> http://www.mysql.com/doc/en/SET_OPTION.html

That's really good to know. Thanks for setting me straight.

Tim

--
Dr Tim Cutts
Informatics Systems Group
Wellcome Trust Sanger Institute
Hinxton, Cambridge, CB10 1SA, UK


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Disabling logging for connection

am 25.02.2004 19:59:57 von Tim Cutts

On 25 Feb 2004, at 17:56, Mike Mimic wrote:
> I asked on another list and I got the answer. It is
> possible. This does the trick:
>
> SET SQL_LOG_OFF=1
>
> More info:
> http://www.mysql.com/doc/en/SET_OPTION.html

That's really good to know. Thanks for setting me straight.

Tim

--
Dr Tim Cutts
Informatics Systems Group
Wellcome Trust Sanger Institute
Hinxton, Cambridge, CB10 1SA, UK


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Java interfaces

am 26.02.2004 11:49:40 von Richard Davis

Brian Shen wrote:
> Dose anyone know how to connect mysql with Java?
>
> Brian

Try JDBC. NetBeans should have all you need to get started.

Richard


--
/
\ Richard M Davis
/ Digital Archives
\ University of London Computer Centre
/ Tel: +44 (0) 20 7692 1350
\ mailto: r.davis@ulcc.ac.uk
/

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Java interfaces

am 26.02.2004 11:49:40 von Richard Davis

Brian Shen wrote:
> Dose anyone know how to connect mysql with Java?
>
> Brian

Try JDBC. NetBeans should have all you need to get started.

Richard


--
/
\ Richard M Davis
/ Digital Archives
\ University of London Computer Centre
/ Tel: +44 (0) 20 7692 1350
\ mailto: r.davis@ulcc.ac.uk
/

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org