Tracking SQL under SQL Server uses Profiler, and how do you track sql under MySQL?
In fact, the method is very simple, turn on the log logging function of MySQL, by viewing the trace log.
To turn on MySQL logs log method:
Configuration methods in the Windows environment:
Version I am using: version:5.0.37-community-nt-log (MySQL Community Edition (GPL))
Find My.ini, mine is in the "G:\Program Files (x86) \mysql\mysql Server 5.0" directory,
Locate [mysqld] and add the following:
Log= the path where the log is stored/my.log
My configuration values:
After you save the file and restart the service, you can find the "mySQL.log" file in the "G:\Program files (x86) \mysql\mysql Server 5.0\data" directory.
How to configure Linux:
Modify/ETC/MY.CNF, find [mysqld], add below:
Log= the path where the log is stored/my.log
When you're done, remember to restart the MySQL service.