Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ How MySQL tracking sql statement     - Hive start being given: Found class jline.Terminal, but interface was expected (Database)

- VMware11 virtual machine Ubuntu14.10 system partition sda1 disk expansion (Linux)

- To compiler and install MariaDB-10.0.20 under CentOS 6.6 (Database)

- Linux firewall to prevent external network attacks (Linux)

- Share and show your code on GitHub (Linux)

- Oracle 11G using DG Broker create DataGuard (Database)

- Standard and IO redirection (Linux)

- Linux script commands - terminal recorder (Linux)

- RedHat Redis Linux installation (Database)

- Linux delete duplicate files Artifact: dupeGuru (Linux)

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

- C / C ++ language variable scope: local variables, global variables, file-level variables (Programming)

- Oracle 12c users create (Database)

- Read the official GNU Make manual one (chapter 1-2) (Programming)

- Daemon under Linux (Linux)

- Enable Intel Rapid Start in GNU / Linux (Linux)

- ORA-00824: can not set sga_target due to existing problem-solving (Database)

- vector C ++ sequence containers (Programming)

- PostgreSQL vacuum principle of a function and parameters (Database)

- Intrusion prevention network server security maintenance tips (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:      
 
- MySQL common functions summary (Database)
- AngularJS application unit testing started (Programming)
- Upgrading Oracle 11.2.0.1.0 to 11.2.0.3.0 (Database)
- Oracle Enterprise Linux 64-bit install apache-tomcat-7.0.53 step (Server)
- The AWK use Cygwin tools mysql binlog log viewer (Database)
- Use SecureCRT to transfer files between local and remote hosts (Linux)
- Linux, set and view environment variables (Linux)
- CentOS 7 update source - the use of domestic sources 163 yum (Linux)
- Android recyclerview cardview (Programming)
- Oracle View Object Information (Database)
- Briefly explain the invasion of the four-level denial of service attack DoS Linux server (Linux)
- Let your PHP 7 faster (GCC PGO) (Linux)
- Unsafe reboot start (Linux)
- Linux startup and logon security settings (Linux)
- Ubuntu mysql stop fail to solve the problem (Database)
- Graphical interface for the CentOS 6.4 installed and connected by remote VNC (Linux)
- ORA-01157 & ORA-01110 Troubleshooting (Database)
- Java, boolean operators & =, | = ^ = use (Programming)
- Java filter (Programming)
- Spark and Hadoop comparison (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.