How can I see the query from a remote session against my server

How can I see the query from a remote session against my server

am 09.06.2010 12:48:54 von Bill Dossett

--_000_181DBC25F994A34C8F5906ADD47DC185952178C463PBINAMSG02M GD_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

I'm a real newb at admining MySQL. We have a customer that uses our soft=
ware that scripts queries and they are using a MySQL backend.

They have sent us a test script and their database and I have setup a test =
server, loaded the data setup an ODBC connection and this all works fine.

The first job they sent us appears to be working fine, but the second one t=
hrows an error saying the query is empty back at us.

I am an IT manager and I don't know much about how our software scripting s=
ystem works or even if there is a debugger, so I was just trying to attack =
the problem from the server side to see if I could see the query at the ser=
ver... I thought profiling might help, but that only helps me with the se=
ssion that I am connected to as far as I can see anyway, I'm not seeing any=
of the queries that are being generated by the remote seesion through the =
odbc connector...

Is there some way the I can see the queries that are being run against this=
server from the remote session? As this is a test system and it's doing v=
ery little, I was hoping that if I could see the query I might get some ins=
ight of what might be wrong in the script without having to learn how our w=
hole scripting software system works.

I have done this with the MSSQL profiler in the past to locate slow queries=
in the past, so I assume it is possible and I just can't make the document=
s on the MySQL profiler make sense to me.

Thanks for any help anyone could provide on this as I've got people that ex=
pect miracles in the next 5 minutes here!

Bill


--_000_181DBC25F994A34C8F5906ADD47DC185952178C463PBINAMSG02M GD_--

Re: How can I see the query from a remote session against my server

am 09.06.2010 15:22:28 von Michael Dykman

You have 2 options here. The Mysql General Query Log

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

Alternatively, if it's windows ( I ask because of the ODBC connector)
and it's easier for you,
I haven't done windows in awhile, but I suspect you might find what
you want via that connector. I seem to recall that you can, via
control panel, set debug options on the connector which will happily
create enormous logs of every query passing through.

best of luck.

- md

(side-note: I would not recommend hosting data services without a DBA
to manage them)

On Wed, Jun 9, 2010 at 6:48 AM, Bill Dossett wrote:
> Hi,
>
> I'm a real newb at admining MySQL. =A0 =A0We have a customer that uses ou=
r software that scripts queries and they are using a MySQL backend.
>
> They have sent us a test script and their database and I have setup a tes=
t server, loaded the data setup an ODBC connection and this all works fine.
>
> The first job they sent us appears to be working fine, but the second one=
throws an error saying the query is empty back at us.
>
> I am an IT manager and I don't know much about how our software scripting=
system works or even if there is a debugger, so I was just trying to attac=
k the problem from the server side to see if I could see the query at the s=
erver... =A0 I thought profiling might help, but that only helps me with th=
e session that I am connected to as far as I can see anyway, I'm not seeing=
any of the queries that are being generated by the remote seesion through =
the odbc connector...
>
> Is there some way the I can see the queries that are being run against th=
is server from the remote session? =A0As this is a test system and it's doi=
ng very little, I was hoping that if I could see the query I might get some=
insight of what might be wrong in the script without having to learn how o=
ur whole scripting software system works.
>
> I have done this with the MSSQL profiler in the past to locate slow queri=
es in the past, so I assume it is possible and I just can't make the docume=
nts on the MySQL profiler make sense to me.
>
> Thanks for any help anyone could provide on this as I've got people that =
expect miracles in the next 5 minutes here!
>
> Bill
>
>



--=20
- michael dykman
- mdykman@gmail.com

May the Source be with you.

--
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: How can I see the query from a remote session against my server

am 09.06.2010 15:47:07 von Anirudh Sundar

--00163630fe89584d6b048899242f
Content-Type: text/plain; charset=ISO-8859-1

Michael is right. But sometimes General log is not enabled and if that is
the case then you need to refer to the "Binary" logs.

But you cannot read the contents of the binlog just like that. You need to
convert that to a readable format.

mysqlbinlog bin.10001 > /tmp/read_bincontent.log

Cheers,
Anirudh Sundar
DataVail Corp
Mumbai


On Wed, Jun 9, 2010 at 6:52 PM, Michael Dykman wrote:

> You have 2 options here. The Mysql General Query Log
>
> http://dev.mysql.com/doc/refman/5.1/en/query-log.html
>
> Alternatively, if it's windows ( I ask because of the ODBC connector)
> and it's easier for you,
> I haven't done windows in awhile, but I suspect you might find what
> you want via that connector. I seem to recall that you can, via
> control panel, set debug options on the connector which will happily
> create enormous logs of every query passing through.
>
> best of luck.
>
> - md
>
> (side-note: I would not recommend hosting data services without a DBA
> to manage them)
>
> On Wed, Jun 9, 2010 at 6:48 AM, Bill Dossett wrote:
> > Hi,
> >
> > I'm a real newb at admining MySQL. We have a customer that uses our
> software that scripts queries and they are using a MySQL backend.
> >
> > They have sent us a test script and their database and I have setup a
> test server, loaded the data setup an ODBC connection and this all works
> fine.
> >
> > The first job they sent us appears to be working fine, but the second one
> throws an error saying the query is empty back at us.
> >
> > I am an IT manager and I don't know much about how our software scripting
> system works or even if there is a debugger, so I was just trying to attack
> the problem from the server side to see if I could see the query at the
> server... I thought profiling might help, but that only helps me with the
> session that I am connected to as far as I can see anyway, I'm not seeing
> any of the queries that are being generated by the remote seesion through
> the odbc connector...
> >
> > Is there some way the I can see the queries that are being run against
> this server from the remote session? As this is a test system and it's
> doing very little, I was hoping that if I could see the query I might get
> some insight of what might be wrong in the script without having to learn
> how our whole scripting software system works.
> >
> > I have done this with the MSSQL profiler in the past to locate slow
> queries in the past, so I assume it is possible and I just can't make the
> documents on the MySQL profiler make sense to me.
> >
> > Thanks for any help anyone could provide on this as I've got people that
> expect miracles in the next 5 minutes here!
> >
> > Bill
> >
> >
>
>
>
> --
> - michael dykman
> - mdykman@gmail.com
>
> May the Source be with you.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=sundar.anirudh@gmail.com
>
>

--00163630fe89584d6b048899242f--

Re: How can I see the query from a remote session against my server

am 09.06.2010 17:01:51 von Michael Dykman

binlogs only contain data modifications, it won't show you the SELECT
queries; I don't think that path is worth your time for the problem at
hand. I suggest you explicitly enable the gebneral query log and
restart if need be.

- md


On Wed, Jun 9, 2010 at 9:47 AM, Anirudh Sundar w=
rote:
> Michael is right. But sometimes General log is not enabled and if that is
> the case then you need to refer to the "Binary" logs.
>
> But you cannot read the contents of the binlog just like that. You need t=
o
> convert that to a readable format.
>
> mysqlbinlog bin.10001 > /tmp/read_bincontent.log
>
> Cheers,
> Anirudh Sundar
> DataVail Corp
> Mumbai
>
>
> On Wed, Jun 9, 2010 at 6:52 PM, Michael Dykman wrote:
>
>> You have 2 options here. =A0The Mysql General Query Log
>>
>> http://dev.mysql.com/doc/refman/5.1/en/query-log.html
>>
>> Alternatively, if it's windows ( I ask because of the ODBC connector)
>> and it's easier for you,
>> I haven't done windows in awhile, but I suspect you might find what
>> you want via that connector. =A0I seem to recall that you can, via
>> control panel, set debug options on the connector which will happily
>> create enormous logs of every query passing through.
>>
>> best of luck.
>>
>> =A0- md
>>
>> =A0(side-note: I would not recommend hosting data services without a DBA
>> to manage them)
>>
>> On Wed, Jun 9, 2010 at 6:48 AM, Bill Dossett wrote=
:
>> > Hi,
>> >
>> > I'm a real newb at admining MySQL. =A0 =A0We have a customer that uses=
our
>> software that scripts queries and they are using a MySQL backend.
>> >
>> > They have sent us a test script and their database and I have setup a
>> test server, loaded the data setup an ODBC connection and this all works
>> fine.
>> >
>> > The first job they sent us appears to be working fine, but the second =
one
>> throws an error saying the query is empty back at us.
>> >
>> > I am an IT manager and I don't know much about how our software script=
ing
>> system works or even if there is a debugger, so I was just trying to att=
ack
>> the problem from the server side to see if I could see the query at the
>> server... =A0 I thought profiling might help, but that only helps me wit=
h the
>> session that I am connected to as far as I can see anyway, I'm not seein=
g
>> any of the queries that are being generated by the remote seesion throug=
h
>> the odbc connector...
>> >
>> > Is there some way the I can see the queries that are being run against
>> this server from the remote session? =A0As this is a test system and it'=
s
>> doing very little, I was hoping that if I could see the query I might ge=
t
>> some insight of what might be wrong in the script without having to lear=
n
>> how our whole scripting software system works.
>> >
>> > I have done this with the MSSQL profiler in the past to locate slow
>> queries in the past, so I assume it is possible and I just can't make th=
e
>> documents on the MySQL profiler make sense to me.
>> >
>> > Thanks for any help anyone could provide on this as I've got people th=
at
>> expect miracles in the next 5 minutes here!
>> >
>> > Bill
>> >
>> >
>>
>>
>>
>> --
>> =A0- michael dykman
>> =A0- mdykman@gmail.com
>>
>> =A0May the Source be with you.
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:
>> http://lists.mysql.com/mysql?unsub=3Dsundar.anirudh@gmail.co m
>>
>>
>



--=20
- michael dykman
- mdykman@gmail.com

May the Source be with you.

--
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: How can I see the query from a remote session against my server

am 09.06.2010 17:43:09 von Jerry Schwartz

The Windows ODBC connector does have a logging function. It's in the
"Details", on the "Debug" tab.

Unfortunately, I haven't been able to figure out where it puts the log file
even after doing a full scan of my hard drive. I searched for myodbc.*, and
didn't find anything that looked like a log file.

Either the feature doesn't work, or I'm blind.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com

>-----Original Message-----
>From: Anirudh Sundar [mailto:sundar.anirudh@gmail.com]
>Sent: Wednesday, June 09, 2010 9:47 AM
>To: mysql@lists.mysql.com
>Subject: Re: How can I see the query from a remote session against my server
>
>Michael is right. But sometimes General log is not enabled and if that is
>the case then you need to refer to the "Binary" logs.
>
>But you cannot read the contents of the binlog just like that. You need to
>convert that to a readable format.
>
>mysqlbinlog bin.10001 > /tmp/read_bincontent.log
>
>Cheers,
>Anirudh Sundar
>DataVail Corp
>Mumbai
>
>
>On Wed, Jun 9, 2010 at 6:52 PM, Michael Dykman wrote:
>
>> You have 2 options here. The Mysql General Query Log
>>
>> http://dev.mysql.com/doc/refman/5.1/en/query-log.html
>>
>> Alternatively, if it's windows ( I ask because of the ODBC connector)
>> and it's easier for you,
>> I haven't done windows in awhile, but I suspect you might find what
>> you want via that connector. I seem to recall that you can, via
>> control panel, set debug options on the connector which will happily
>> create enormous logs of every query passing through.
>>
>> best of luck.
>>
>> - md
>>
>> (side-note: I would not recommend hosting data services without a DBA
>> to manage them)
>>
>> On Wed, Jun 9, 2010 at 6:48 AM, Bill Dossett wrote:
>> > Hi,
>> >
>> > I'm a real newb at admining MySQL. We have a customer that uses our
>> software that scripts queries and they are using a MySQL backend.
>> >
>> > They have sent us a test script and their database and I have setup a
>> test server, loaded the data setup an ODBC connection and this all works
>> fine.
>> >
>> > The first job they sent us appears to be working fine, but the second one
>> throws an error saying the query is empty back at us.
>> >
>> > I am an IT manager and I don't know much about how our software scripting
>> system works or even if there is a debugger, so I was just trying to attack
>> the problem from the server side to see if I could see the query at the
>> server... I thought profiling might help, but that only helps me with the
>> session that I am connected to as far as I can see anyway, I'm not seeing
>> any of the queries that are being generated by the remote seesion through
>> the odbc connector...
>> >
>> > Is there some way the I can see the queries that are being run against
>> this server from the remote session? As this is a test system and it's
>> doing very little, I was hoping that if I could see the query I might get
>> some insight of what might be wrong in the script without having to learn
>> how our whole scripting software system works.
>> >
>> > I have done this with the MSSQL profiler in the past to locate slow
>> queries in the past, so I assume it is possible and I just can't make the
>> documents on the MySQL profiler make sense to me.
>> >
>> > Thanks for any help anyone could provide on this as I've got people that
>> expect miracles in the next 5 minutes here!
>> >
>> > Bill
>> >
>> >
>>
>>
>>
>> --
>> - michael dykman
>> - mdykman@gmail.com
>>
>> May the Source be with you.
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:
>> http://lists.mysql.com/mysql?unsub=sundar.anirudh@gmail.com
>>
>>




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

RE: How can I see the query from a remote session against my server

am 09.06.2010 17:48:04 von Bill Dossett

Thanks all for the replies, I seemed to have figured out why this was empty=
.... they gave me the wrong data to load into the test database and queries =
into it found no matches... I assumed that would be the problem and they ar=
e sending new data... however, I am going to try and get the debug log wor=
king if possible as it sounds pretty useful, so thanks again.

Bill


-----Original Message-----
From: Jerry Schwartz [mailto:jerry@gii.co.jp]=20
Sent: 09 June 2010 16:43
To: 'Anirudh Sundar'; mysql@lists.mysql.com
Subject: RE: How can I see the query from a remote session against my serve=
r

The Windows ODBC connector does have a logging function. It's in the=20
"Details", on the "Debug" tab.

Unfortunately, I haven't been able to figure out where it puts the log file=
=20
even after doing a full scan of my hard drive. I searched for myodbc.*, and=
=20
didn't find anything that looked like a log file.

Either the feature doesn't work, or I'm blind.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

www.the-infoshop.com

>-----Original Message-----
>From: Anirudh Sundar [mailto:sundar.anirudh@gmail.com]
>Sent: Wednesday, June 09, 2010 9:47 AM
>To: mysql@lists.mysql.com
>Subject: Re: How can I see the query from a remote session against my serv=
er
>
>Michael is right. But sometimes General log is not enabled and if that is
>the case then you need to refer to the "Binary" logs.
>
>But you cannot read the contents of the binlog just like that. You need to
>convert that to a readable format.
>
>mysqlbinlog bin.10001 > /tmp/read_bincontent.log
>
>Cheers,
>Anirudh Sundar
>DataVail Corp
>Mumbai
>
>
>On Wed, Jun 9, 2010 at 6:52 PM, Michael Dykman wrote:
>
>> You have 2 options here. The Mysql General Query Log
>>
>> http://dev.mysql.com/doc/refman/5.1/en/query-log.html
>>
>> Alternatively, if it's windows ( I ask because of the ODBC connector)
>> and it's easier for you,
>> I haven't done windows in awhile, but I suspect you might find what
>> you want via that connector. I seem to recall that you can, via
>> control panel, set debug options on the connector which will happily
>> create enormous logs of every query passing through.
>>
>> best of luck.
>>
>> - md
>>
>> (side-note: I would not recommend hosting data services without a DBA
>> to manage them)
>>
>> On Wed, Jun 9, 2010 at 6:48 AM, Bill Dossett wrote=
:
>> > Hi,
>> >
>> > I'm a real newb at admining MySQL. We have a customer that uses our
>> software that scripts queries and they are using a MySQL backend.
>> >
>> > They have sent us a test script and their database and I have setup a
>> test server, loaded the data setup an ODBC connection and this all works
>> fine.
>> >
>> > The first job they sent us appears to be working fine, but the second =
one
>> throws an error saying the query is empty back at us.
>> >
>> > I am an IT manager and I don't know much about how our software script=
ing
>> system works or even if there is a debugger, so I was just trying to att=
ack
>> the problem from the server side to see if I could see the query at the
>> server... I thought profiling might help, but that only helps me with =
the
>> session that I am connected to as far as I can see anyway, I'm not seein=
g
>> any of the queries that are being generated by the remote seesion throug=
h
>> the odbc connector...
>> >
>> > Is there some way the I can see the queries that are being run against
>> this server from the remote session? As this is a test system and it's
>> doing very little, I was hoping that if I could see the query I might ge=
t
>> some insight of what might be wrong in the script without having to lear=
n
>> how our whole scripting software system works.
>> >
>> > I have done this with the MSSQL profiler in the past to locate slow
>> queries in the past, so I assume it is possible and I just can't make th=
e
>> documents on the MySQL profiler make sense to me.
>> >
>> > Thanks for any help anyone could provide on this as I've got people th=
at
>> expect miracles in the next 5 minutes here!
>> >
>> > Bill
>> >
>> >
>>
>>
>>
>> --
>> - michael dykman
>> - mdykman@gmail.com
>>
>> May the Source be with you.
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:
>> http://lists.mysql.com/mysql?unsub=3Dsundar.anirudh@gmail.co m
>>
>>




--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dbilld@emtex.com



--
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: How can I see the query from a remote session against my server

am 09.06.2010 22:46:15 von Michael Dykman

This is awhile ago, but I seem to recall it just dumping loads of
stuff into System32

On Wed, Jun 9, 2010 at 11:43 AM, Jerry Schwartz wrote:
> The Windows ODBC connector does have a logging function. It's in the
> "Details", on the "Debug" tab.
>
> Unfortunately, I haven't been able to figure out where it puts the log fi=
le
> even after doing a full scan of my hard drive. I searched for myodbc.*, a=
nd
> didn't find anything that looked like a log file.
>
> Either the feature doesn't work, or I'm blind.
>
> Regards,
>
> Jerry Schwartz
> Global Information Incorporated
> 195 Farmington Ave.
> Farmington, CT 06032
>
> 860.674.8796 / FAX: 860.674.8341
>
> www.the-infoshop.com
>
>>-----Original Message-----
>>From: Anirudh Sundar [mailto:sundar.anirudh@gmail.com]
>>Sent: Wednesday, June 09, 2010 9:47 AM
>>To: mysql@lists.mysql.com
>>Subject: Re: How can I see the query from a remote session against my ser=
ver
>>
>>Michael is right. But sometimes General log is not enabled and if that is
>>the case then you need to refer to the "Binary" logs.
>>
>>But you cannot read the contents of the binlog just like that. You need t=
o
>>convert that to a readable format.
>>
>>mysqlbinlog bin.10001 > /tmp/read_bincontent.log
>>
>>Cheers,
>>Anirudh Sundar
>>DataVail Corp
>>Mumbai
>>
>>
>>On Wed, Jun 9, 2010 at 6:52 PM, Michael Dykman wrote:
>>
>>> You have 2 options here. =A0The Mysql General Query Log
>>>
>>> http://dev.mysql.com/doc/refman/5.1/en/query-log.html
>>>
>>> Alternatively, if it's windows ( I ask because of the ODBC connector)
>>> and it's easier for you,
>>> I haven't done windows in awhile, but I suspect you might find what
>>> you want via that connector. =A0I seem to recall that you can, via
>>> control panel, set debug options on the connector which will happily
>>> create enormous logs of every query passing through.
>>>
>>> best of luck.
>>>
>>> =A0- md
>>>
>>> =A0(side-note: I would not recommend hosting data services without a DB=
A
>>> to manage them)
>>>
>>> On Wed, Jun 9, 2010 at 6:48 AM, Bill Dossett wrot=
e:
>>> > Hi,
>>> >
>>> > I'm a real newb at admining MySQL. =A0 =A0We have a customer that use=
s our
>>> software that scripts queries and they are using a MySQL backend.
>>> >
>>> > They have sent us a test script and their database and I have setup a
>>> test server, loaded the data setup an ODBC connection and this all work=
s
>>> fine.
>>> >
>>> > The first job they sent us appears to be working fine, but the second=
one
>>> throws an error saying the query is empty back at us.
>>> >
>>> > I am an IT manager and I don't know much about how our software scrip=
ting
>>> system works or even if there is a debugger, so I was just trying to at=
tack
>>> the problem from the server side to see if I could see the query at the
>>> server... =A0 I thought profiling might help, but that only helps me wi=
th the
>>> session that I am connected to as far as I can see anyway, I'm not seei=
ng
>>> any of the queries that are being generated by the remote seesion throu=
gh
>>> the odbc connector...
>>> >
>>> > Is there some way the I can see the queries that are being run agains=
t
>>> this server from the remote session? =A0As this is a test system and it=
's
>>> doing very little, I was hoping that if I could see the query I might g=
et
>>> some insight of what might be wrong in the script without having to lea=
rn
>>> how our whole scripting software system works.
>>> >
>>> > I have done this with the MSSQL profiler in the past to locate slow
>>> queries in the past, so I assume it is possible and I just can't make t=
he
>>> documents on the MySQL profiler make sense to me.
>>> >
>>> > Thanks for any help anyone could provide on this as I've got people t=
hat
>>> expect miracles in the next 5 minutes here!
>>> >
>>> > Bill
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> =A0- michael dykman
>>> =A0- mdykman@gmail.com
>>>
>>> =A0May the Source be with you.
>>>
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe:
>>> http://lists.mysql.com/mysql?unsub=3Dsundar.anirudh@gmail.co m
>>>
>>>
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: =A0 =A0http://lists.mysql.com/mysql?unsub=3Dmdykman@gmail=
..com
>
>



--=20
- michael dykman
- mdykman@gmail.com

May the Source be with you.

--
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