Reputation: 18511
using mysql - is there a tool that can show a live log of all the sql commands the mysql engine receives?
a. It would be helpfull to see explain plan for the DML commands.
b. It would be helpfull if it could be turned on and off on a mysql server with no need to restart the service.
c. open source/free like the mysql itself would be nice.
Thanks.
Upvotes: 2
Views: 319
Reputation: 29749
You first need to activate the general query log. There must be some tools around to help you parse this log, my favourite being :
tail -f /path/to/mysql.log
;)
Unfortunately, this may not be disabled dynamically, you would need to restart the server in order to activate/disable the log.
Careful, though, activating this log has a severe performance impact. Do not use it in production.
Upvotes: 3