mysql如何跟踪执行的sql语句_MySQL
bitsCN.com
在SQL SERVER下跟踪sql采用事件探查器,而在mysql下如何跟踪sql呢?
其实方法很简单,开启mysql的日志log功能,通过查看跟踪日志即可。
开启mysql的日志log方法:
windows环境下的配置方法:
我使用的版本:Version: 5.0.37-community-nt-log (MySQL Community Edition (GPL))
找到my.ini,我的是在“G:/Program Files (x86)/MySQL/MySQL Server 5.0”目录下,
找到[mysqld],在下面添加:
log=存放日志的路径/my.log
我的配置值:
保存文件,重启服务之后,在“G:/Program Files (x86)/MySQL/MySQL Server 5.0/data”目录下可以找到“mySQL.log”文件。
linux下的配置方法:
修改/etc/my.cnf,找到[mysqld],在下面添加:
log=存放日志的路径/my.log
修改完后,记得重启mysql服务哦。 bitsCN.com

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solve the problem of third-party interface returning 403 in Node.js environment. When we use Node.js to call third-party interfaces, we sometimes encounter an error of 403 from the interface returning 403...

The page is blank after PHP connects to MySQL, and the reason why die() function fails. When learning the connection between PHP and MySQL database, you often encounter some confusing things...

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...

Detailed explanation of the problem of deducting balances in combination with PHP optimistic locks and transactions in this article will analyze in detail a balance deduction using PHP, optimistic locks and database transactions, only...

ThinkPHP6 database query: How to use TP6 to implement SQL statements SELECTSUM(jin), SUM(chu)FROMsysdbuil In ThinkPHP6 framework, how to use SQL statement SELECT...

The problem of comparing and synchronizing BeyondCompare files: Case sensitivity failure when using Beyond...

mysql...

How to avoid the third-party interface returning 403 error in the Node environment. When calling the third-party website interface using Node.js, you sometimes encounter the problem of returning 403 error. �...
