Pages

Search This Blog

Sunday, October 17, 2010

MS SQL profiler like for mysql

I was looking around a software for MySQL that can work like MSSQL profiler which can monitor the SQL query executed. Finally i found one called Log Monitor which work well for me.


How it's work? Download Log Monitor. Open LogMonitor.jar file.


Connect to MySQL server, open a SQL Query window and run this script



SET GLOBAL general_log = 'ON';



Check on log file location in my.ini file (for windows user) or my.cnf (for linux user).

For windows user,
#Path to the database root
datadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/"

Open Log Monitor and set "log file path" with the file name. 




Now, open another SQL Query window and run any script. You can see the query you run displayed in the Log Monitor.



Hope this help.

No comments: