ruby based mysql sniffer

Discussion in 'Ruby' started by Junkone, Sep 5, 2008.

  1. Junkone

    Junkone Guest

    therei sone in perl. i am looking for a equavalent in ruby. i just
    want to trace the sql statements being executed by mysql as i cannot
    debug my client app to find out what sql it is sending out to the
    database.
    http://iank.org/querysniffer/
     
    Junkone, Sep 5, 2008
    #1
    1. Advertising

  2. Junkone <> writes:

    > therei sone in perl. i am looking for a equavalent in ruby. i just
    > want to trace the sql statements being executed by mysql as i cannot
    > debug my client app to find out what sql it is sending out to the
    > database.


    1. why don't you just turn on logging in mysql and check out the query
    log?

    2. since you can't debug the client app (whatever that means) does it
    matter what language the sniffer is written in?

    ho pet hishelps

    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
     
    Joost Diepenmaat, Sep 5, 2008
    #2
    1. Advertising

  3. Junkone

    Phlip Guest

    Junkone wrote:

    > therei sone in perl. i am looking for a equavalent in ruby. i just
    > want to trace the sql statements being executed by mysql as i cannot
    > debug my client app to find out what sql it is sending out to the
    > database.


    If you use ActiveRecord, try assert_latest{}. It returns an array of arrays
    containing all SELECT statements emitted during its block, including their
    EXPLAIN results.

    But if you need something lower level, doesn't MySQL itself have a query logging
    option?

    --
    Phlip
     
    Phlip, Sep 5, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGF2aWQgQmFrZXI=?=

    Creating browser sniffer with ASP.Net

    =?Utf-8?B?RGF2aWQgQmFrZXI=?=, May 3, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    3,120
    =?Utf-8?B?RGF2aWQgQmFrZXI=?=
    May 3, 2004
  2. dex

    packet sniffer

    dex, Apr 8, 2005, in forum: Java
    Replies:
    0
    Views:
    424
  3. Paul Watt

    browser sniffer

    Paul Watt, Jul 6, 2005, in forum: HTML
    Replies:
    12
    Views:
    2,560
    dorayme
    Jul 7, 2005
  4. AMC
    Replies:
    12
    Views:
    389
    Roland Hall
    Jan 13, 2005
  5. Randy Lawrence

    mysql-ruby or ruby-mysql?

    Randy Lawrence, May 23, 2004, in forum: Ruby
    Replies:
    3
    Views:
    118
    Randy Lawrence
    May 24, 2004
Loading...

Share This Page