Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ How MySQL tracking sql statement     - Taught you how to build your own VPS server (Server)

- Modifying the system registry protection server security (Linux)

- How to modify the Emacs Major Mode Shortcuts (Linux)

- Linux cd command Detailed (Linux)

- Not safe procedure under Linux (Linux)

- Use py2exe to generate exe files Python script (Programming)

- Linux system commands to view hardware information (Linux)

- Spring Data study notes -Helloworld (Programming)

- CentOS Set the Mono environment variable (Server)

- Analysis RabbitMQ cluster (Server)

- Install the open source database PostgreSQL 9.4 and phpMyAdmin on Ubuntu (Database)

- Oracle query start with connect by tree (Database)

- 10 example of the detection memory usage free Linux commands (Linux)

- Python decorators to learn and practice the actual usage scenarios (Programming)

- WordPress blog installation Redis Cache (Server)

- Ubuntu 14.10 installation GNOME 3.14 (Linux)

- Father of Python: Why Python zero-based index (Programming)

- Linux directory permissions to read and execute permissions difference (Linux)

- Storm basic framework for analysis (Programming)

- How to enhance the security of Linux systems (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:      
 
- How to create SWAP files in Ubuntu 14.04 (Linux)
- Under CentOS Linux automatic backup MySQL database daily (Database)
- Linux System Getting Started Learning: Disable Ubuntu Apport internal error reporting procedures (Linux)
- CentOS 7 open ports (Linux)
- To explore the Android ListView caching mechanism again (Programming)
- How to write a new Git protocol (Linux)
- Analysis JavaBean (Programming)
- error no.2013 lost connection Tom with SQLServer during query (Database)
- Install RAID 6 (Striping double distributed parity) (Linux)
- Create RAID 1 (mirroring) with two disks (Linux)
- Manually create Oracle Database Explanations (Database)
- Linux compression and decompression command (Linux)
- Axel install plug under CentOS 5/6 acceleration yum downloads (Linux)
- Log4j configuration file Explanation (Linux)
- Linux Shell debugging (Programming)
- Linux System Getting Started Tutorial: How to update outdated version of Ubuntu (Linux)
- Linux C programming and Shell Programming in the development of practical tools similarities summary (Programming)
- Linux system security infrastructure Highlights (Linux)
- Linux host dual LAN transceiver package ARP problem (Linux)
- Linux permissions Detailed (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.