2

I would like to see live all mysql running queries (like profiler in mssql) I tried jet profiler, but I don't get same result as mssql profiler. Is there such a tool or maybe build in option to output to log?

I'll spill more light, maybe someone will think about workaround. I use entity framework to connect from .net to mysql. there are queries that work in development environment and not in production. I want to see parsed query to see what is wrong.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
eddyuk
  • 4,110
  • 5
  • 37
  • 65

1 Answers1

3

You can edit your configuration file and enable logging. In my.cnf look for:

#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.

# log = /var/log/mysql/mysql.log

Uncomment the log line than you can use tail to monitor the queries:

tail -f /var/log/mysql/mysql.log

You need to restart the server to apply the new configuration.

hovanessyan
  • 30,580
  • 6
  • 55
  • 83