You can see the prepared statements right? They were really helpful to
us at my work. What is the problem you're having? I know you can write
your own debuggable Preparedstatement class if you're feeling really
ambitious. You might even look for one on the net. I remember reading
an article about someone writing their own so they could see the
populated query at runtime.
LR - 18 Apr 2005 10:40 GMT
> You can see the prepared statements right? They were really helpful to
> us at my work. What is the problem you're having? I know you can write
> your own debuggable Preparedstatement class if you're feeling really
> ambitious. You might even look for one on the net. I remember reading
> an article about someone writing their own so they could see the
> populated query at runtime.
Thank you for your answer.
I dont have a specific problem, I am juste looking for a mysql tool to
monitor and see queries the mysql server must execute. The queries printed
by hibernate are usefull, but they dont show the values, only "?" instead...
Regards
Lilian
> I use Hibernate in my java project and I know the "show sql" option but it
> doesnt display the entire query. How could I monitor my MySQL server to see
> the queries executed ?
You can enable the query log on your MySQL server by re-starting it with
the --log=logfilename option (or equivalently, "log=logfilename" in your
server configuration file).
All connections and statements will be logged to the file you specify,
in the order that the server received and executes them.
Here's the manual page:
http://dev.mysql.com/doc/mysql/en/query-log.html
Remember to switch off query logging when it's served its purpose,
because the log file can become very large indeed!
Hope this helps.
David Harper
Cambridge, England
LR - 18 Apr 2005 10:47 GMT
>> I use Hibernate in my java project and I know the "show sql" option but
>> it doesnt display the entire query. How could I monitor my MySQL server
[quoted text clipped - 18 lines]
> David Harper
> Cambridge, England
That is exactly what I was looking for, thank you
Best regards
Lilian