Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ How MySQL tracking sql statement     - Android using SVG vector graphics to create cool animation effects (Programming)

- CentOS7 install MySQL5.6.22 (Linux)

- Installation Elementary OS Freya to do some settings (Linux)

- Nginx + uWSGI + Django + Python Application Architecture Deployment (Server)

- Ubuntu system grub repair method (Linux)

- Java, hashcode, equals and == (Programming)

- Java rewrite equals method (Programming)

- Linux development management utility command (Linux)

- Shell Scripting Basics (Linux)

- Linux System Getting Started Learning: complete installation on Debian or Ubuntu kernel source (Linux)

- Depth understanding of Python character set encoding (Programming)

- Implicit conversion from Java type conversion compare MySQL and Oracle (Database)

- Linux Firewall Basics (Linux)

- Merge sort Java implementation (Programming)

- MySQL replication master and slave structure built (Database)

- Linux shell script debugging (Linux)

- Create RAID 1 (mirroring) with two disks (Linux)

- SSH configuration under Linux (Linux)

- Unix average load average load calculation method (Server)

- Linux network security probing tools Hping2 (Linux)

 
         
  How MySQL tracking sql statement
     
  Add Date : 2018-11-21      
         
         
         
  In project development, will inevitably encounter on the database server to perform tracking sql statement needs by tracking sql statement is executed, we can determine when the upper application in the implementation of sql statement, the database end whether to execute the sql statement, execute the sql statement if there is an error, and so on. In short, the end of the tracking database sql statement is executed greatly facilitated the logical database coding error in the investigation.

We all know that in SQL SERVER tracking using sql profiler, then in MySQL How to track the sql statement executed?

By some google, baidu, found a simple but not the ultimate solution.

Solution

1, the idea is very simple: open the MySQL log log function, by looking at the logs to trace.

2, open the MySQL log log method:

[Configure Windows environment]

Find my.ini in Mysql server installation directory, I was in: The next "C \ Program Files \ MySQL \ MySQL Server 5.5" directory,

Find [mysqld] field in my.ini, and add the following: log = path to store the log /mysql.log

My configuration:

After modifying my.ini done, save the file, restart mysql service to the C: found mysql.log file / Users / Administrator /.

In MySQL client executes a sql statement to see mysql.log logs to realize the sql statement tracking.
     
         
         
         
  More:      
 
- Hands to teach you to solve Ubuntu error message (Linux)
- 14.04.3 Ubuntu configuration and successfully compiled source code Android 6.0 r1 (Programming)
- Install Java on RHEL6 (Linux)
- Object-oriented language Java some of the basic features (Programming)
- Build the first ASP.NET 5 Web project in Mac OS X Yosemite 10.10.3 (Server)
- Change the kernel boot sequence after CentOS 7 kernel upgrade (Linux)
- MongoDB 3.2 to upgrade from 3.0.7 (Database)
- Java thread pool: ExecutorService, Executors (Programming)
- Iptables Instructions (Linux)
- CentOS 5.8 (64) Python 2.7.5 installation error resolved (Linux)
- Scope of variables in Object-C (Programming)
- Compile and install the latest version of Redis Stable (Database)
- Build your own CA services: OpenSSL command line CA Quick Guide (Server)
- RPM package creation Getting Started (Linux)
- Distributed transaction management Spring declarative transactions (Programming)
- MySQL 5.7 can not log in problem (Database)
- Apache Web Security Linux systems (Linux)
- Linux Getting Started tutorial: Ubuntu 14.04 in the installation Sogou Pinyin (Linux)
- Install minimize RHEL / CentOS 7 things to do (Linux)
- Linux (Ubuntu) How iptables port mapping (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.