ruby based mysql sniffer

J

Junkone

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

Joost Diepenmaat

Junkone said:
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
 
P

Phlip

Junkone said:
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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top