Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ How MySQL tracking sql statement     - Installation and Configuration rsync server under CentOS 6.3 (Server)

- Macro Analysis Performance: PHP Performance Analysis and Experiment (Programming)

- Linux cron job (Linux)

- Linux common network tools: traceroute routing of scanned (Linux)

- How to install PlayOnLinux 4.2.5 under Ubuntu 14.04 / 12.04 (Linux)

- About Java 7 module system (Programming)

- To install Redis under Linux (Database)

- Daemon under Linux (Linux)

- Let Markdown code syntax highlighting and support Django1.6 (Linux)

- Cobbler batch install Ubuntu / CentOS system (Linux)

- Linux Programming memory mapping (Programming)

- ORA-4031 error Solution (Database)

- php for Linux the MySQL extension module installation and configuration (Database)

- CentOS 7 Change Hostname (Linux)

- The oh-my-zsh into true my zsh (Linux)

- Large site architecture study notes (Server)

- OpenGL Superb Learning Notes - New Patterns (Programming)

- Linux NIC driver and version information (Linux)

- Configuring LIDS build Linux kernel security intrusion detection system (Linux)

- How to fix fatal error: security / pam_modules.h: No such file or directory (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:      
 
- Nginx request processing (Server)
- Linux automatic installation and implementation (Linux)
- Select helps secure the system network management tools (Linux)
- Linux serial port driver test (Linux)
- The Linux kernel and AVL tree in red-black tree (Programming)
- How to allow users to access only a specific database (MSSQL) (Database)
- Mybatis + binding Struts2: achieving user to insert and find (Programming)
- Python console achieve progress bar (Programming)
- Spring AOP (Programming)
- Copy Recovery using RMAN repository development environment (Database)
- Linux, set and view environment variables (Linux)
- Sublime Text 3 best features, plug-ins and settings (Linux)
- Logging information through the web GUI (LogAnalyzer) (Server)
- Linux Systemd-- To start / stop / restart services in RHEL / CentOS 7 (Linux)
- C # asynchronous delegates (Programming)
- CentOS How quickly customize kernel binary RPM package (Linux)
- 10 Codes of good practice PHP (Programming)
- Linux file permissions to modify the command: chmod (Linux)
- How to install Kernel 4.0.2 on CentOS 7 (Linux)
- Install mono offline on CentOS (Server)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.