Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ How MySQL tracking sql statement     - Linux keyboard recording script (Linux)

- DRBD daily management (Server)

- Ubuntu 14.04 users how to install VLC 2.2.0 (Linux)

- Oracle 12CIN-memory in table spaces (Database)

- ActiveMQ5.10.2 version configuration JMX (Linux)

- Linux kernel programming parameter passing between modules and function calls (Programming)

- Linux terminal program running in the background (Linux)

- How to run Kali Linux 2.0 in Docker container (Linux)

- Linux /var/spool/ insufficient clientmqueue space solutions (Linux)

- Easily create RPM packages using the FPM (Linux)

- Ubuntu 14.04 LTS compiler installation R Source Code (Linux)

- You can not ignore the seven Git tips (Linux)

- Django1.8 return json json string and the string contents of the received post (Programming)

- Oracle View index and use indexes Precautions (Database)

- Calling Qt libraries to implement functional processes of some summary (Programming)

- Linux environment variable settings methods and differences (Linux)

- Linux systems use IP masquerading anti-hacker (Linux)

- Fedora 20 installation source Xen4.3.0 (Linux)

- How do you know your public IP terminal in Linux (Linux)

- Into the Java keyword instanceof (Programming)

 
         
  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:      
 
- Linux Programming memory mapping (Programming)
- Oracle11g build physical standby database (Database)
- Oracle ordinary users show parameter method (Database)
- Talk about Java EE Learning (Programming)
- Oracle 11g creates virtual private directory RMAN-06004 ORA-00942 error handling (Database)
- The basic method RHEL6 (CentOS6) used in the source package compiled RPM: Upgrade OpenSSH articles (Linux)
- Source MongoDB 3.2.1 installed on CentOS6.5 (Database)
- Ubuntu users Steam controller does not work solutions (Linux)
- Android realize RippleEffect water (Programming)
- Dockerfile use to build a mirror-based CentOS 7 (Linux)
- How to Install Winusb in Ubuntu 14.04 (Linux)
- Oracle 11g contraction table space error ORA-03297: file contains used data beyondrequested RESIZE value (Database)
- Shell script on the variables with double quotation marks grep small problem (Programming)
- How to upgrade to Ubuntu 14.04 Linux Kernel 4.4.1 LTS (Linux)
- MD5 and simple to use (Linux)
- CentOS Linux firewall configuration and Close (Linux)
- The traffic monitoring system: cacti (Linux)
- How to install Visual Studio Code on Ubuntu (Linux)
- Nginx + ownCloud + PHP + MySQL to build personal private cloud under CentOS7 (Server)
- Use Docker containers (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.