Frage

Is there any easy way to track/monitor all the SQL of the queries, executed by an MySQL server (on a Windows machine)?

Update: I am asking about the free tool.

War es hilfreich?

Lösung

  1. Send this command to the server: set global general_log=1;
  2. Find the log file (the default on Win7 it resides in C:\ProgramData\MySQL\MySQL Server 5.1\data) and has a name just like the computer.
  3. Examine the log :)
  4. Set the general_log back to 0 to return the DB server performance back to normal.

Andere Tipps

What worked for me on local windows 7 x64 installation of MYSQL 5.6 was:

  • Open your my.ini file and make sure you have these lines:

    Long query log

    
    long_query_time = 1
    slow_query_log = 1
    slow_query_log_file = "C:\Zend\MySQL5.6\slowquery.log"
    
    

    Set General Log

    
    general_log=1
    general_log_file = "C:\Zend\MySQL5.6\genquery.log"
    
    
  • Save file and restart the service

To switch off general query logs, set general_log value to 0 and restart. And do not forget to change the paths of log files to match your system.

You could download a 30-day trial of: MONyog. If it's the tool for you, I suggest you buy it.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top