Mysql _mysql SQL statements that are executed by viewing trace logs

Source: Internet
Author: User

Tracking SQL under SQL Server uses Profiler, and how do you track sql under MySQL?

In fact, the method is very simple, open the MySQL log logs function, by viewing the trace log can be.

Open the MySQL log logging method:

Configuration methods in the Windows environment:

The version I used: 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 to store the log/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.

The configuration method under Linux:

Modify the/ETC/MY.CNF, locate [mysqld], and add the following:

Log= the path to store the log/my.log

After the modification, remember to restart the MySQL service Oh.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.